数字证书通常包含以下信息:
版本
序列号
签名算法
签名哈希算法
颁发者
有效期
使用者
公钥
公钥参数
对于https的网页,在Chrome的网页上点击锁->证书,可将证书导出。
对于数字签名的文件,在windows下,右键属性,可导出相关证书。
在命令行下可用openssl工具查看证书信息。
本地计算机安装的证书可在windows的运行中键入certmgr.msc打开查看。
$ openssl x509 -in outputfile1 -inform der -text -noout
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 3 (0x3)
Signature Algorithm: sha256WithRSAEncryption
Issuer: O=Tencent, OU=Tlinux, CN=Tencent Secure Boot KEK/emailAddress=g_APD_SRDC_OS@tencent.com
Validity
Not Before: May 23 09:18:56 2019 GMT
Not After : May 20 09:18:56 2029 GMT
Subject: O=Tencent, OU=Tlinux, CN=Tencent Secure Boot DB/emailAddress=g_APD_SRDC_OS@tencent.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:b2:49:10:14:0c:33:72:31:46:00:b9:87:c0:ed:
4b:60:6a:2e:1e:6a:0c:22:03:ba:b4:0c:e3:6e:4c:
46:b5:2a:e5:11:41:e8:8b:32:79:9b:f2:eb:d1:33:
16:85:56:3e:fc:34:3f:f9:03:f3:d0:3a:2d:d2:c6:
92:43:3a:79:c7:bb:11:1e:9f:28:a6:96:df:c8:0b:
ef:4b:c5:db:22:c5:b0:12:8a:0d:0c:79:68:3c:49:
92:7b:63:bc:01:24:0c:bb:c4:fb:bd:67:35:b5:4a:
04:8a:fd:81:4f:ae:a6:97:fb:39:87:0b:6e:2c:59:
91:c2:b9:78:fb:41:19:a5:b6:d8:b3:e3:d0:36:86:
40:5a:61:e9:b3:61:9e:47:bc:d8:d3:da:99:ec:0a:
38:b0:45:94:34:cc:80:c5:47:d1:7a:c5:93:3c:a8:
70:d3:04:db:c7:d9:ec:1d:1c:9f:17:a0:c7:f5:d3:
77:53:6c:78:a8:13:c4:af:c0:20:4a:42:8b:97:75:
86:af:94:c2:34:48:91:8f:96:5e:b7:05:f2:82:ed:
05:5f:f9:8b:38:bb:81:71:0c:ed:3e:ff:e6:c2:b6:
f9:a3:de:82:9d:15:6c:37:55:59:0d:6a:8e:f1:be:
46:63:aa:1b:c5:fc:77:7d:af:b2:eb:9f:fa:c8:ce:
fe:ef
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
87:2D:BE:49:45:18:21:B4:0C:CB:39:F0:78:98:67:8C:EF:8C:62:EE
X509v3 Authority Key Identifier:
keyid:50:82:F3:F8:C5:66:5D:69:5D:DA:C7:DC:1F:5E:AD:D9:EE:CA:94:D8
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha256WithRSAEncryption
39:34:a6:eb:16:d6:6f:a6:dc:18:bd:36:64:dd:16:c6:b6:42:
99:db:d5:8c:9c:e2:15:37:39:56:21:f7:da:ee:74:79:42:7e:
e6:ba:41:ba:d0:c2:f5:4e:fd:b2:b9:05:78:2f:60:f0:da:90:
73:c5:65:41:da:d2:e2:6e:b5:09:eb:e5:b3:77:74:67:df:44:
e5:e3:40:81:28:e2:06:7f:27:bf:39:c1:48:a4:e3:fd:19:e5:
8a:14:fd:73:8f:a1:68:f7:bb:96:9b:44:0b:67:62:dc:94:2a:
83:1d:32:75:ca:a2:8a:ef:43:f0:33:a9:74:b8:57:a4:e8:6f:
d3:dd:83:23:ca:1b:27:b4:77:1e:ef:d7:1e:4d:85:84:18:d1:
8d:4d:ca:ae:96:9d:d2:0d:2f:00:e8:57:66:f6:9b:3a:dc:f6:
b0:85:a8:63:44:89:a7:de:82:d8:1b:b4:cc:ed:48:86:46:25:
eb:7d:b3:e0:b9:9a:4a:55:3b:c2:0c:04:e0:cf:10:17:53:2f:
6b:29:2c:af:8e:85:78:69:0b:28:2c:8d:72:72:fe:95:4f:b6:
ae:17:74:91:b5:f8:b1:5a:3c:e1:cf:2c:7e:c3:85:4f:99:4a:
eb:c8:3a:2a:9b:30:2c:69:f8:9d:fa:a0:d5:9f:45:32:10:65:
de:30:3f:3d