klyn.net.ssl.SSLContext.withClientCertificate
method

    public withClientCertificate(certificatePath as Object, privateKeyPath as Object) as SSLContext throws SSLException:

Description

Returns a copy with a client certificate and private key.

Parameters

Parameter | Description
--- | ---
`certificatePath` | Certificate file (`String` or `Path`).
`privateKeyPath` | Private key file (`String` or `Path`).

Throws

- SSLException if TLS options, certificates, trust paths, or socket creation are invalid.

Example

    import klyn.net.ssl

    context = SSLContext.clientDefault().withClientCertificate("client.crt", "client.key")
    print(context.clientCertificateFile)