wultra / ssl-pinning-android

Android SDK for our dynamic SSL pinning
Apache License 2.0
60 stars 8 forks source link

Implement support for OkHttp #1

Closed petrdvorak closed 5 years ago

petrdvorak commented 5 years ago

We can enhance the SSL pinning support on Android by implementing some high-level support for integration in OkHttp, which is the most common networking framework on Android.

TomasKypta commented 5 years ago

The support for OkHttp has been already added.

For integrating with OkHttp there are SSLPinningIntegration and SSLPinningX509TrustManager classes. You can integrate it this way:

val okhttpClient = OkHttpClient.Builder()
                .sslSocketFactory(sslSocketFactory, trustManager)
                .build()

We don't support OkHttp's CertificatePinner since it uses public key pinning. But WultraSSLPinning uses certificate pinning. See README and FAQ for more info.