okhttp / okhttp3 / OkHttpClient / Builder / certificatePinner

certificatePinner

fun certificatePinner(certificatePinner: CertificatePinner): OkHttpClient.Builder

Sets the certificate pinner that constrains which certificates are trusted. By default HTTPS connections rely on only the SSL socket factory to establish trust. Pinning certificates avoids the need to trust certificate authorities.