Hello,
How do I go about getting the SHA1 fingerprint from a PEM certificate I have on disk?
I tried using SecCertificateCreateWithData and getting the SHA1Digest but it dones not match whats in the certificate.
Thanks!
Hello,
How do I go about getting the SHA1 fingerprint from a PEM certificate I have on disk?
I tried using SecCertificateCreateWithData and getting the SHA1Digest but it dones not match whats in the certificate.
Thanks!
Any help in this 2014 SO thread?
http://stackoverflow.com/questions/23371619/how-to-get-ssl-certificate-sha1-fingerprint-in-closed
How do I go about getting the SHA1 fingerprint from a PEM certificate I have on disk?
What platform are you working on?
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
Hi Quinn, I'm using macOS.
macOS can import PEM certificates directly (using
SecItemImport). Once you have a certificate object you can get a SHA1 fingerprint by getting the certificate in DER form (
SecCertificateCopyData) and then doing a SHA1 of that data (with
CC_SHA1).
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"