Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1793871
  • 博文数量: 184
  • 博客积分: 10122
  • 博客等级: 上将
  • 技术积分: 5566
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-08 12:32
文章存档

2011年(1)

2008年(183)

我的朋友

分类: LINUX

2008-03-08 12:04:38

[root@monitor ssl.crt]# openssl x509 -in mail.bob.com.crt -serial -noout
serial=00
[root@monitor ssl.crt]#
 
不过真实的证书序列号是很长的。
 
[root@monitor ssl.crt]# openssl x509 -in my.crt -serial -noout
serial=D01E40900000274B0000000100000004
[root@monitor ssl.crt]#
 
上面是一个真实的证书的序列号,证书的内容如下 (来自 /usr/share/ssl/certs/ca-bundle.crt)
 
ABAecom (sub., Am. Bankers Assn.) Root CA
=========================================
MD5 Fingerprint: 82:12:F7:89:E1:0B:91:60:A4:B6:22:9F:94:68:11:92
PEM Data:
-----BEGIN CERTIFICATE-----
MIID+DCCAuCgAwIBAgIRANAeQJAAACdLAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw
gYwxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRVdGFoMRcwFQYDVQQHEw5TYWx0IExh
a2UgQ2l0eTEYMBYGA1UEChMPWGNlcnQgRVogYnkgRFNUMRgwFgYDVQQDEw9YY2Vy
dCBFWiBieSBEU1QxITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAe
Fw05OTA3MTQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
MAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxGDAWBgNVBAoT
D1hjZXJ0IEVaIGJ5IERTVDEYMBYGA1UEAxMPWGNlcnQgRVogYnkgRFNUMSEwHwYJ
KoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUA
A4IBDwAwggEKAoIBAQCtVBjetL/3reh0qu2LfI/C1HUa1YS5tmL8ie/kl2GS+x24
4VpHNJ6eBiL70+o4y7iLB/caoBd3B1owHNQpOCDXJ0DYUJNDv9IYoil2BXKqa7Zp
mKt5Hhxl9WqL/MUWqqJy2mDtTm4ZJXoKHTDjUJtCPETrobAgHtsCfv49H7/QAIrb
QHamGKUVp1e2UsIBF5h3j4qBxhq0airmr6nWAKzP2BVJfNsbof6B+of505DBAsD5
0ELpkWglX8a/hznplQBgKL+DLMDnXrbXNhbnYId26OcnsiUNi3rlqh3lWc3OCw5v
xsic4xDZhTnTt5v6xrp8dNJddVardKSiUb9SfO5xAgMBAAGjUzBRMA8GA1UdEwEB
/wQFMAMBAf8wHwYDVR0jBBgwFoAUCCBsZuuBCmxc1bWmPEHdHJaRJ3cwHQYDVR0O
BBYEFAggbGbrgQpsXNW1pjxB3RyWkSd3MA0GCSqGSIb3DQEBBQUAA4IBAQBah1iP
Lat2IWtUDNnxQfZOzSue4x+boy1/2St9WMhnpCn16ezVvZY/o3P4xFs2fNBjLDQ5
m0i4PW/2FMWeY+anNG7T6DOzxzwYbiOuQ5KZP5jFaTDxNjutuTCC1rZZFpYCCykS
YbQRifcML5SQhZgonFNsfmPdc/QZ/0qB0bJSI/08SjTOWhvgUIrtT4GV2GDn5MQN
u1g+WPdOaG8+Z8nLepcWJ+xCYRR2uwDF6wg9FX9LtiJdhzuQ9PPA/jez6dliDMDD
Wa9gvR8N26E0HzDEPYutsB0Ek+1f1eS/IDAE9EjpMwHRLpAnUrOb3jocq6mXf5vr
wo3CbezcE9NGxXl8
-----END CERTIFICATE-----
 
把上面的内容保存为 my.crt ,再进行查询
 
 
[root@monitor ssl.crt]# openssl x509 -text -in my.crt -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            d0:1e:40:90:00:00:27:4b:00:00:00:01:00:00:00:04
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by

        Validity
            Not Before: Jul 14 16:14:18 1999 GMT
            Not After : Jul 11 16:14:18 2009 GMT
        Subject: C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by

        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (2048 bit)
                Modulus (2048 bit):
                    00:ad:54:18:de:b4:bf:f7:ad:e8:74:aa:ed:8b:7c:
                    8f:c2:d4:75:1a:d5:84:b9:b6:62:fc:89:ef:e4:97:
                    61:92:fb:1d:b8:e1:5a:47:34:9e:9e:06:22:fb:d3:
                    ea:38:cb:b8:8b:07:f7:1a:a0:17:77:07:5a:30:1c:
                    d4:29:38:20:d7:27:40:d8:50:93:43:bf:d2:18:a2:
                    29:76:05:72:aa:6b:b6:69:98:ab:79:1e:1c:65:f5:
                    6a:8b:fc:c5:16:aa:a2:72:da:60:ed:4e:6e:19:25:
                    7a:0a:1d:30:e3:50:9b:42:3c:44:eb:a1:b0:20:1e:
                    db:02:7e:fe:3d:1f:bf:d0:00:8a:db:40:76:a6:18:
                    a5:15:a7:57:b6:52:c2:01:17:98:77:8f:8a:81:c6:
                    1a:b4:6a:2a:e6:af:a9:d6:00:ac:cf:d8:15:49:7c:
                    db:1b:a1:fe:81:fa:87:f9:d3:90:c1:02:c0:f9:d0:
                    42:e9:91:68:25:5f:c6:bf:87:39:e9:95:00:60:28:
                    bf:83:2c:c0:e7:5e:b6:d7:36:16:e7:60:87:76:e8:
                    e7:27:b2:25:0d:8b:7a:e5:aa:1d:e5:59:cd:ce:0b:
                    0e:6f:c6:c8:9c:e3:10:d9:85:39:d3:b7:9b:fa:c6:
                    ba:7c:74:d2:5d:75:56:ab:74:a4:a2:51:bf:52:7c:
                    ee:71
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints: critical
            CA:TRUE
            X509v3 Authority Key Identifier:
            keyid:08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
 
            X509v3 Subject Key Identifier:
            08:20:6C:66:EB:81:0A:6C:5C:D5:B5:A6:3C:41:DD:1C:96:91:27:77
    Signature Algorithm: sha1WithRSAEncryption
        5a:87:58:8f:2d:ab:76:21:6b:54:0c:d9:f1:41:f6:4e:cd:2b:
        9e:e3:1f:9b:a3:2d:7f:d9:2b:7d:58:c8:67:a4:29:f5:e9:ec:
        d5:bd:96:3f:a3:73:f8:c4:5b:36:7c:d0:63:2c:34:39:9b:48:
        b8:3d:6f:f6:14:c5:9e:63:e6:a7:34:6e:d3:e8:33:b3:c7:3c:
        18:6e:23:ae:43:92:99:3f:98:c5:69:30:f1:36:3b:ad:b9:30:
        82:d6:b6:59:16:96:02:0b:29:12:61:b4:11:89:f7:0c:2f:94:
        90:85:98:28:9c:53:6c:7e:63:dd:73:f4:19:ff:4a:81:d1:b2:
        52:23:fd:3c:4a:34:ce:5a:1b:e0:50:8a:ed:4f:81:95:d8:60:
        e7:e4:c4:0d:bb:58:3e:58:f7:4e:68:6f:3e:67:c9:cb:7a:97:
        16:27:ec:42:61:14:76:bb:00:c5:eb:08:3d:15:7f:4b:b6:22:
        5d:87:3b:90:f4:f3:c0:fe:37:b3:e9:d9:62:0c:c0:c3:59:af:
        60:bd:1f:0d:db:a1:34:1f:30:c4:3d:8b:ad:b0:1d:04:93:ed:
        5f:d5:e4:bf:20:30:04:f4:48:e9:33:01:d1:2e:90:27:52:b3:
        9b:de:3a:1c:ab:a9:97:7f:9b:eb:c2:8d:c2:6d:ec:dc:13:d3:
        46:c5:79:7c
[root@monitor ssl.crt]#
阅读(3430) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~