hiviah/pyx509

x509 building

Closed this issue · 2 comments

sr-gi commented

Hi there,

I would like to know if is there any way to build a TBS certificate (or extract it directly from a pre loaded Certificate) and encoding it back to der.

I'm trying to get a fingerprint of the TBS and sign it but without including it inside the Certificate..

Thanks a lot,

This is for parsing only. For the task you request using directly pyasn1 should be more suitable. It allows you to extract the TBS cert and use its DER encoder to re-encode it (or maybe directly return the byte substrate) and then hash it.

sr-gi commented

I finally managed to do it using pyasn1.

Thanks a lot,