I'm currently getting a private key with
openssl pkcs8 -in file.key -inform DER
And for some cer file
openssl x509 -text -inform DER -in file.cer
I can handle the extraction calling the commands on the terminal from python but I would prefer to do it with python libraries.
I looked for examples with pyopenssl but I didn't find something really similar to what I'm trying to achieve.
How can I achieve the same result using python libraries?