Converting as_der to OpenSSL.crypto.X509 object
Closed this issue · 2 comments
ahaw021 commented
Hi Mate
Love your work.
You have the conversion below. How would you reverse this to get a OpenSSL.crypto.X509 object?
"as_der": base64.b64encode(crypto.dump_certificate(crypto.FILETYPE_ASN1, certificate)).decode('utf-8')
Andrei
Fitblip commented
Hey @ahaw021 - you're looking for the crypto.load_certificate
function, you can find more details on the PyOpenSSL package documentation - https://pyopenssl.org/en/stable/api/crypto.html#OpenSSL.crypto.load_certificate