klyn.net.TlsOptions.withClientCertificate
method

    public withClientCertificate(certificatePath as Object, privateKeyPath as Object) as TlsOptions throws ProtocolException:

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 tls = TlsOptions.clientDefault().withClientCertificate("client.crt", "client.key") print(tls.clientCertificateFile) ```

Throws

- ProtocolException if the provided URL, path, TLS option, certificate option, or protocol value is invalid or unsupported.