question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support sha512 digest in CertificatePinner

See original GitHub issue

We 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
swankjessecommented, Apr 7, 2019

@hkhc that’s a bad policy and your infosec people should feel bad.

1reaction
yschimkecommented, Apr 4, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found