I 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.
I 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
CertificatePinnerclass and overridecheck()?Thanks in advance.