openssl 如何从pfx格式证书 获取证书序列号信息

已知:一个个人证书文件 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密码,如下图所示:

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

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

相关推荐

  1. openssl生成ssl证书

    2024-04-14 06:10:03       40 阅读
  2. openssl生成免费证书

    2024-04-14 06:10:03       22 阅读
  3. OpenSSL自签名证书

    2024-04-14 06:10:03       8 阅读
  4. Openssl X509证书HexStream中解析

    2024-04-14 06:10:03       11 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-14 06:10:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-14 06:10:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-14 06:10:03       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-14 06:10:03       20 阅读

热门阅读

  1. git 如何合并两个分支中的某些文件

    2024-04-14 06:10:03       13 阅读
  2. python 今日小知识1——parser

    2024-04-14 06:10:03       16 阅读
  3. tomcat按顺序启动应用

    2024-04-14 06:10:03       12 阅读
  4. xxl-job调度任务原理解析

    2024-04-14 06:10:03       16 阅读
  5. Qt | .pro开发经验笔记

    2024-04-14 06:10:03       14 阅读
  6. uniapp——长按识别二维码

    2024-04-14 06:10:03       15 阅读
  7. c#raft算法实现

    2024-04-14 06:10:03       14 阅读
  8. 蓝桥杯3527 阶乘的和 Python

    2024-04-14 06:10:03       14 阅读
  9. 使用Spring Cloud构建微服务时的一些经验

    2024-04-14 06:10:03       15 阅读
  10. React中常见的Hook

    2024-04-14 06:10:03       16 阅读
  11. 如何在seata中编写测试用例

    2024-04-14 06:10:03       13 阅读
  12. spring.cloud.gateway.discovery.locator.enabled配置项分析

    2024-04-14 06:10:03       15 阅读