从DER格式的证书提取公钥 [英] Extract public key from certificate in DER format

查看:817
本文介绍了从DER格式的证书提取公钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.cer证书文件,需要提取公钥。我只能提取到PEM格式。 outform参数无效

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

是否可以以DER格式提取?


<解决方案解决base64 PEM文件:

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

欢迎任何其他想法。


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?

解决方案

Solved decoding the base64 PEM file:

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

Any other idea is welcome.

这篇关于从DER格式的证书提取公钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆