OpenSSL x509 命令详解:证书查看与解析
openssl x509 是日常运维中最常用的证书查看工具。本文聚焦于查看和解析证书信息,不涉及证书生成。 基本语法 1 openssl x509 [options] -in <certificate file> 常用查看命令 查看证书完整信息 1 openssl x509 -in cert.pem -text -noout 输出包含:版本、序列号、签名算法、颁发者、有效期、主体、公钥、扩展信息。 只查看关键字段 1 2 3 4 5 6 7 8 9 10 11 # 查看主体(Subject) openssl x509 -in cert.pem -subject -noout # 查看颁发者(Issuer) openssl x509 -in cert.pem -issuer -noout # 查看有效期 openssl x509 -in cert.pem -dates -noout # 查看序列号 openssl x509 -in cert.pem -serial -noout 查看公钥信息 1 openssl x509 -in cert....