Option to not enforce Certificate pinning
See original GitHub issueI am using Okhttp + Retrofit for networking in my SDK. I have a requirement to implement Certificate pinning but not enforce it. We just need to get the failure reports for pinning failure and would like the connection to go through for now during the monitoring period. TrustKit is another Certificate pinning library which provides this option to set enforce = false. With this, the connection itself wouldn’t fail but we can get the failure reports.
I do not see a way to achieve similar behavior using the Okhttp CertificatePinner
. Are there any plans to add this functionality?
Or do you have any suggestions on how I can achieve this behavior using the existing functionality?
Would have been easier if we could extend CertificatePinner
class and override check()
?
Thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:18
Top GitHub Comments
@yschimke Does below code make sense?
`
class CustomCertCheckInterceptor(val certificatePinner: CertificatePinner) : Interceptor {
}
`
@shenoymukesh The point of putting the question on stackoverflow is to use that for discussion, and not continuing the noise to other developers here. Closing this discussion. Please reply there.