//okhttp/okhttp3/CertificatePinner/check
check¶
[jvm]\ fun check(hostname: String, peerCertificates: List<Certificate>)
Confirms that at least one of the certificates pinned for hostname is in peerCertificates. Does nothing if there are no certificates pinned for hostname. OkHttp calls this after a successful TLS handshake, but before the connection is used.
Throws¶
| javax.net.ssl.SSLPeerUnverifiedException | if peerCertificates don’t match the certificates pinned for hostname. |