Support sha512 digest in CertificatePinner
See original GitHub issueWe have requirement to use sha512 digest for certificate pinning, and we have that in legacy code based on good old TrustManager. We planned to migrate it to okhttp. However the CertificatePinner
in okhttp supports sha1 and sha256 only.
On the other hand, CertificatePinner
does not have extensibility in mind, so I cannot extend the class for additional type of digest. The simplest way to get out of the situation seems to be enhancing the CertificatePinner
directly. If there is no fundamental cause to avoid sha512 digest, i am happy to contribute enhancement to the class.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to calculate certificate pin for OkHttp | by Weidian Huang
OkHttp provides an easy-to-use class CertificatePinner for certificate pinning. It accepts 2 types of pins, SHA-256 and SHA-1 as mentioned ...
Read more >Securing mobile applications with certificate pinning
There are three ways to implement certificate pinning on Android: TrustManager; OkHttp and CertificatePinner; Network Security Configuration ( ...
Read more >How Do We Generate a Base64-Encoded SHA256 Hash of ...
Certificate pinning is done by providing a set of certificates by hash of the public key (SubjectPublicKeyInfo of the X.509 certificate). A ...
Read more >CertificatePinner - ktor
Constrains which certificates are trusted. Pinning certificates defends against attacks on certificate authorities. It also prevents connections through man-in- ...
Read more >Generate SHA512 certificate - Microsoft Q&A
When i generate a certificate, it is sign using SHA256RSA, is it posible to have SHA384 or SHA512? thats the signature algorithm supported...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hkhc that’s a bad policy and your infosec people should feel bad.
Curious, does this come from an RFC? or a decision made within your org. Generally https://tools.ietf.org/html/rfc7469 seems to assume sha256 is the way forward for now.