查看证书的有效期
[root@host ~]# openssl x509 -in ca.pem -noout -dates
notBefore=Oct 12 07:56:37 2023 GMT
notAfter=Oct 9 07:56:37 2033 GMT
打印证书的内容
[root@host ~]# openssl x509 -in ca.pem -noout -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
6b:42:63:51:9e:33:c6:0e:07:24:16:f8:1e:cf:d8:f9:bf:2b:7b:61
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=CN, ST=Guangdong, L=Shenzhen, O=Ts, OU=DCP, CN=registry.ts.com
Validity
Not Before: Jul 12 07:13:00 2021 GMT
Not After : Jul 11 07:13:00 2026 GMT
Subject: C=CN, ST=Guangdong, L=Shenzhen, O=Ts, OU=DCP, CN=registry.ts.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:df:33:93:7a:a9:71:f8:4a:61:2a:f7:c9:54:8c:
ad:4b:b4:db:6e:b8:27:f5:06:a8:05:cf:1c:57:05:
ac:9a:29:5e:6f:8f:22:02:12:9a:80:85:38:ec:6d:
91:92:83:2e:f2:ae:58:fa:99:d3:a7:af:9a:23:04:
32:c1:8e:33:1c:75:0b:9d:b7:6a:8b:38:58:19:f1:
4a:a3:29:1f:57:61:59:26:fc:ca:6f:32:2c:11:de:
ca:f1:42:5e:1e:42:6d:5b:4c:20:e1:e6:ab:20:65:
68:3f:6a:58:ca:7d:4b:4d:54:87:5e:1e:1a:2f:1a:
4b:d5:53:3c:8a:12:c5:8b:ca:3a:e4:73:e0:2e:7e:
69:fc:44:9e:1f:ba:3a:41:ea:04:57:ed:0a:43:9a:
fc:57:da:2e:7a:e3:1b:78:87:c8:2f:2b:2c:b0:ae:
44:61:e4:21:7b:9a:60:4d:15:19:20:68:0f:a7:1b:
8a:29:c5:98:ed:14:66:3d:67:36:94:58:16:fc:99:
ef:55:4c:fd:f3:fb:a0:24:57:0c:25:7d:06:00:53:
74:97:8f:3f:9b:72:89:0c:e4:e5:6e:76:6a:1d:a9:
db:88:3b:f8:ba:a6:02:a0:40:65:f8:8d:55:41:c9:
46:9d:e8:62:25:d6:19:d7:53:d3:95:98:85:9c:8e:
6d:a1
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Key Usage: critical
Certificate Sign, CRL Sign
X509v3 Basic Constraints: critical
CA:TRUE
X509v3 Subject Key Identifier:
D2:DB:92:1B:9E:00:CD:E4:5D:C7:5F:A7:B3:F6:0D:2A:7F:A5:4F:05
Signature Algorithm: sha256WithRSAEncryption
28:57:bf:38:ef:80:0c:1d:16:5d:47:09:56:7c:8c:4f:06:9a:
9c:68:5b:b3:e3:ae:ab:26:ae:d1:2a:0d:dc:6c:45:98:c0:09:
2c:ab:1e:7f:e7:a1:07:95:cb:fa:cd:8b:d4:1a:59:2e:41:f9:
80:eb:ab:c4:64:12:a4:d1:5c:22:aa:04:72:80:a3:52:bd:92:
1f:84:54:c9:89:e7:e7:59:b0:4d:72:d3:29:f5:02:3f:46:86:
79:e4:2e:fb:1c:e4:e8:4a:f5:06:44:8f:61:d8:e0:52:b3:f6:
ab:4f:dc:c2:c0:ee:54:d6:d8:ac:b8:7a:bd:3b:16:cb:53:2d:
c6:c9:67:b4:4f:72:e1:9c:23:be:0e:92:8e:3a:1e:04:b5:98:
3e:66:b0:5d:a4:75:84:ce:7a:5b:1e:6f:b1:47:d1:1c:10:35:
23:58:26:66:17:53:4f:f3:84:cc:c3:a3:22:a0:8f:03:50:00:
eb:70:18:11:42:09:fc:4c:63:4b:e5:4e:b7:59:00:57:7f:4e:
ca:ce:d1:e2:6e:a2:03:3d:28:8c:18:56:b8:e0:cd:26:66:17:
01:d2:14:2e:dc:48:22:43:4a:db:86:9f:bf:cb:46:fe:1f:a9:
7d:89:9a:47:70:e4:1a:84:6c:9c:72:12:e5:1c:c2:21:7e:38:
fe:40:2c:14