Extract public key from certificate in DER format

2019-03-18 00:18发布

I have a .cer certificate file, and need to extract the Public Key. I can only extract to PEM format. The "outform" parameter does nothing.

openssl x509 -inform PEM -in certificate.cer -outform DER -pubkey -noout > publickey.der

Is it possible to extract in DER format?

1条回答
\"骚年 ilove
2楼-- · 2019-03-18 00:45

Solved decoding the base64 PEM file:

openssl x509 -in certificate.cer -pubkey -noout | openssl enc -base64 -d > publickey.der

Any other idea is welcome.

查看更多
登录 后发表回答