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
ParameterDescription
certificatePathCertificate file (String or Path).
privateKeyPathPrivate 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)