check

fun check(hostname: String, peerCertificates: List<<Error class: unknown class>>)

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

SSLPeerUnverifiedException

if peerCertificates don't match the certificates pinned for hostname.