[Cryptography-dev] Compute issuerKeyHash
Alex Gaynor
alex.gaynor at gmail.com
Thu Sep 16 11:57:02 EDT 2021
You want Encoding.DER, not PEM.
Alex
On Thu, Sep 16, 2021 at 11:51 AM pepone.onrez <pepone.onrez at gmail.com> wrote:
>
> Hi,
>
> Is there a way to compute the issuer key hash from the certificate issuer?
>
> I tried with:
>
> public_key = issuer_cert.public_key().public_bytes(
> Encoding.PEM,
> PublicFormat.SubjectPublicKeyInfo)
> print(hashlib.sha1(public_key).digest())
>
> This doesn't seem to be it, I was previously using oscrypto
>
> issuerSha1 = cert.asn1.public_key.sha1
>
> is there a way to get this info with pyca/cryptography?
>
> Cheers,
> Jose
> _______________________________________________
> Cryptography-dev mailing list
> Cryptography-dev at python.org
> https://mail.python.org/mailman/listinfo/cryptography-dev
--
All that is necessary for evil to succeed is for good people to do nothing.
More information about the Cryptography-dev
mailing list