Skip to content

Commit

Permalink
Add better description of TLSConfigBuilder.addCertificateChain()
Browse files Browse the repository at this point in the history
  • Loading branch information
aueam authored and bjhham committed Mar 1, 2024
1 parent 1a53599 commit 4633438
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import javax.net.ssl.*
public actual class TLSConfigBuilder {
/**
* List of client certificate chains with private keys.
*
* The Chain will be used only if the first certificate in the chain is issued by server's certificate.
*/
public val certificates: MutableList<CertificateAndKey> = mutableListOf()

Expand Down Expand Up @@ -76,6 +78,8 @@ public actual fun TLSConfigBuilder.takeFrom(other: TLSConfigBuilder) {

/**
* Add client certificate chain to use.
*
* It will be used only if the first certificate in the chain is issued by server's certificate.
*/
public fun TLSConfigBuilder.addCertificateChain(chain: Array<X509Certificate>, key: PrivateKey) {
certificates += CertificateAndKey(chain, key)
Expand Down

0 comments on commit 4633438

Please sign in to comment.