如何在命令行中查看网站公钥的字节?

问题描述 投票:0回答:1

我正在尝试查看https://www.unh.edu/使用的证书中显示的公共密钥的字节,如何在终端中看到呢?谢谢!

linux ssl networking public-key
1个回答
0
投票
echo | openssl s_client -showcerts -servername unh.edu -connect unh.edu:443

输出:

2>/dev/null | openssl x509 -inform pem -noout -text
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            41:c4:df:cb:23:86:89:4a:a8:88:fe:f9:d2:e9:10:95
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=US, ST=MI, L=Ann Arbor, O=Internet2, OU=InCommon, CN=InCommon RSA Server CA
        Validity
            Not Before: Jan 17 00:00:00 2018 GMT
            Not After : Jan 16 23:59:59 2021 GMT
        Subject: C=US/postalCode=03824, ST=NH, L=Durham/street=Dimond Library, O=University of New Hampshire, OU=IT Academic Technology, CN=www.unh.edu
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:ea:66:be:e0:80:83:fb:72:0d:36:2c:ff:7f:dc:
                    63:c4:8d:df:6c:45:91:20:8b:e9:82:70:38:2d:e1:
                    4d:eb:bb:a7:7d:2f:f4:1f:a7:d1:11:f6:b1:d9:93:
                    e7:8c:a2:64:d2:d0:3e:7f:d1:ad:15:85:b7:4d:af:
                    fb:78:44:ee:fa:23:a9:8f:d5:76:7a:05:48:f8:14:
                    f9:59:c6:ed:fd:fb:1d:c2:c6:c0:85:03:d0:2c:08:
                    05:52:9c:da:ed:3a:02:15:39:f6:46:8f:05:f1:26:
                    43:8b:02:ce:6c:15:06:42:c7:be:f1:9e:ae:61:60:
                    02:5e:84:ec:4e:29:ac:0c:e0:c4:78:a3:bf:85:d5:
                    54:85:84:0d:41:6f:9c:c2:41:48:6f:f3:7d:d1:05:
                    a9:b1:66:2e:dd:57:a7:20:3a:c3:da:8f:03:4b:9e:
                    1f:94:21:92:eb:b0:ee:e2:7a:b3:3d:ca:ea:ac:ea:
                    35:d0:dc:ac:a9:d3:32:c6:54:ce:57:46:4e:07:37:
                    15:11:22:89:8c:87:e8:06:91:d3:2c:44:4e:22:8f:
                    46:b1:3f:85:7d:aa:a1:4a:33:5e:b1:a0:c6:5a:64:
                    a0:50:72:3f:50:d5:09:d8:cf:c1:a4:39:c4:b0:2c:
                    45:c4:fa:2f:00:5b:d2:44:23:b3:f3:25:7b:8f:62:
                    c4:1d
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Authority Key Identifier: 
                keyid:1E:05:A3:77:8F:6C:96:E2:5B:87:4B:A6:B4:86:AC:71:00:0C:E7:38

            X509v3 Subject Key Identifier: 
                A8:CE:D6:5F:01:4E:BD:E7:47:92:0C:7B:8E:51:20:C4:0F:0E:21:59
            X509v3 Key Usage: critical
                Digital Signature, Key Encipherment
            X509v3 Basic Constraints: critical
                CA:FALSE
            X509v3 Extended Key Usage: 
                TLS Web Server Authentication, TLS Web Client Authentication
            X509v3 Certificate Policies: 
                Policy: 1.3.6.1.4.1.5923.1.4.3.1.1
                  CPS: https://www.incommon.org/cert/repository/cps_ssl.pdf
                Policy: 2.23.140.1.2.2

            X509v3 CRL Distribution Points: 

                Full Name:
                  URI:http://crl.incommon-rsa.org/InCommonRSAServerCA.crl

            Authority Information Access: 
                CA Issuers - URI:http://crt.usertrust.com/InCommonRSAServerCA_2.crt
                OCSP - URI:http://ocsp.usertrust.com

            X509v3 Subject Alternative Name: 
                DNS:www.unh.edu, DNS:d7admin.unh.edu, DNS:unh.edu
    Signature Algorithm: sha256WithRSAEncryption
         75:54:88:71:9c:05:0d:6d:2f:f4:df:df:f1:23:0d:1f:da:fd:
         d7:ef:82:1b:02:9b:8e:c3:74:e0:e9:9a:7c:07:07:14:94:9b:
         c6:40:0c:27:f0:9c:cc:c7:4a:07:4a:06:95:d3:3e:33:05:3a:
         41:07:15:b6:c1:c4:87:29:32:61:51:10:e1:ec:31:01:bb:71:
         9f:c9:62:3a:d5:0d:a3:4f:0d:1c:d1:8b:1c:a3:00:41:d0:9b:
         f6:6d:5d:14:48:f4:ad:06:3a:9e:c1:e8:3f:47:9a:66:7b:b2:
         2f:26:5f:3a:4c:24:19:34:1d:32:f7:ce:63:4e:b7:6e:52:d7:
         f9:3e:7c:c1:08:51:a7:06:0f:34:c6:d0:bb:06:97:96:51:04:
         b7:42:78:6e:29:d0:26:ad:35:05:82:f7:e3:cf:c2:57:a6:28:
         0b:6e:74:ec:c2:13:c9:6c:e5:e5:5b:df:40:d8:cc:4a:25:cf:
         f7:14:5d:f4:b6:6a:c9:4e:c8:ed:47:d6:b9:e0:1a:2a:d7:10:
         42:ae:81:4d:c5:13:a4:2a:ad:88:5c:d4:0e:95:44:d7:ee:9a:
         46:c0:17:f8:ed:35:62:5a:d4:f8:58:a4:7b:b1:fa:ac:e4:9f:
         17:f1:1c:13:99:15:3f:ad:64:7d:a1:18:bd:2c:78:01:29:66:
         00:11:04:36
© www.soinside.com 2019 - 2024. All rights reserved.