已知:一个个人证书文件 test.pfx

求:如何通过openssl查看其对应证书的序列号信息?

踩坑之:unable to load certificate!

openssl x509 -in xxx.cert -noout -serial 命令可查看证书序列号,但是这个-in 的输入必须是私钥文件或者是公钥证书文件,pfx文件不能直接读取,会报错:unable to load certificate!

处理步骤1、从pfx文件提取私钥文件test.pem

openssl pkcs12 -in test.pfx -nodes -out test.pem  输入正确的pfx密码,如下图所示:

openssl
传输层安全性/安全套接层及其加密库

步骤2: openssl x509 -in test.pem -noout -serial 查看序列号

文本查看私钥文件内容: openssl x509 -in test.pem -noout -text

阅读全文
AI总结
GitHub 加速计划 / ope / openssl
27
1
下载
传输层安全性/安全套接层及其加密库
最近提交(Master分支:6 个月前 )
8f99bcdb Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/27342) 1 天前
dfc03679 Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/27342) 1 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐