Skip to content

Option to not enforce Certificate pinning #5924

@shenoymukesh

Description

@shenoymukesh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions