//okhttp-tls/okhttp3.tls/HandshakeCertificates/Builder
Builder¶
[jvm]\ class Builder
Constructors¶
Builder | [jvm] fun Builder() |
Functions¶
Name | Summary |
---|---|
addInsecureHost | [jvm] fun addInsecureHost(hostname: String): HandshakeCertificates.Builder Configures this to not authenticate the HTTPS server on to hostname. This makes the user vulnerable to man-in-the-middle attacks and should only be used only in private development environments and only to carry test data. |
addPlatformTrustedCertificates | [jvm] fun addPlatformTrustedCertificates(): HandshakeCertificates.Builder Add all of the host platform’s trusted root certificates. This set varies by platform (Android vs. Java), by platform release (Android 4.4 vs. Android 9), and with user customizations. |
addTrustedCertificate | [jvm] fun addTrustedCertificate(certificate: X509Certificate): HandshakeCertificates.Builder Add a trusted root certificate to use when authenticating a peer. Peers must provide a chain of certificates whose root is one of these. |
build | [jvm] fun build(): HandshakeCertificates |
heldCertificate | [jvm] fun heldCertificate(heldCertificate: HeldCertificate, vararg intermediates: X509Certificate): HandshakeCertificates.Builder Configure the certificate chain to use when being authenticated. The first certificate is the held certificate, further certificates are included in the handshake so the peer can build a trusted path to a trusted root certificate. |