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
  • certificatePath Certificate file (`String` or `Path`).
  • privateKeyPath Private key file (`String` or `Path`). ```klyn import klyn.net.ssl context = SSLContext.clientDefault().withClientCertificate("client.crt", "client.key") print(context.clientCertificateFile) ```
Throws
  • SSLException if TLS options, certificates, trust paths, or socket creation are invalid.