Re: [Cryptography-dev] Compute issuerKeyHash

2021-09-16 Thread pepone.onrez
Thanks Alex, I found that I can also do issuerSha1 = issuer_cert.extensions.get_extension_for_class(SubjectKeyIdentifier).value.digest Cheers, Jose On Thu, 16 Sept 2021 at 17:57, Alex Gaynor wrote: > You want Encoding.DER, not PEM. > > Alex > > On Thu, Sep 16, 2021 at 11:51 AM pepone.onrez >

Re: [Cryptography-dev] Compute issuerKeyHash

2021-09-16 Thread Alex Gaynor
You want Encoding.DER, not PEM. Alex On Thu, Sep 16, 2021 at 11:51 AM pepone.onrez 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.Subjec

[Cryptography-dev] Compute issuerKeyHash

2021-09-16 Thread pepone.onrez
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 o