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

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

Throws

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

Example

    import klyn.net

    tls = TlsOptions.clientDefault().withClientCertificate("client.crt", "client.key")
    print(tls.clientCertificateFile)