iT邦幫忙

0

請問關於憑證的資訊要怎麼查看

crt
  • 分享至 

  • xImage

因為要申請憑證,但前面填寫欄位的資訊忘記
透過
openssl req -in 憑證名稱.csr -noout -text
欄位資訊會出現像是這樣 \C3\BBO\C3\A5_\C3\A5\C3\AB
這樣子我該如何去轉換成英文呢

froce iT邦大師 1 級 ‧ 2021-07-15 08:36:19 檢舉
你這不會是英文...這通常是用非ascii的字元給openssl去簽,但是沒有注意編碼。
而且有點怪怪的,像我用正常的憑證去看,欄位會是 \xE6\xB8而不是像你的 \C3\BB。

建議用windows的憑證檢視器看,這個能正確處理憑證的中文欄位。
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

0
海綿寶寶
iT邦大神 1 級 ‧ 2021-07-14 18:44:09

openssl x509 -text -in yourdomain.crt -noout
資料來源

1010bpdev iT邦新手 4 級 ‧ 2021-07-14 19:25:21 檢舉

是的,但想詢問的是 OU欄位資訊會顯示 \C3\BBO\C3\A5_\C3\A5\C3\AB 這種格式,想請問這是哪種編碼? 我該如何去轉換

我不知道如何轉換
只看得出不太像中文

找了一個中文OU的憑證有如下
https://ithelp.ithome.com.tw/upload/images/20210715/20001787syzuFdWCDz.png

$ openssl x509 -text -in twcert-org-tw.pem -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            19:59:f5:a5:b7:2d:f3:cc:b7:b6:2f:d7:45:47:3b:70
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=TW, O=Chunghwa Telecom Co., Ltd., OU=Public Certification Authority - G2
        Validity
            Not Before: Apr 20 06:22:43 2020 GMT
            Not After : Apr 20 06:22:43 2022 GMT
        Subject: C=TW, L=\xE8\x87\xBA\xE5\x8C\x97\xE5\xB8\x82, O=\xE8\xB2\xA1\xE5\x9C\x98\xE6\xB3\x95\xE4\xBA\xBA\xE5\x8F\xB0\xE7\x81\xA3\xE7\xB6\xB2\xE8\xB7\xAF\xE8\xB3\x87\xE8\xA8\x8A\xE4\xB8\xAD\xE5\xBF\x83, CN=*.twcert.org.tw
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
1
補覺鳴詩
iT邦高手 1 級 ‧ 2021-07-14 20:28:44
openssl req -text -noout -verify -in  <filename>.csr

D:\>"C:\Program Files\OpenSSL-Win64\bin\openssl.exe"  req -text -noout -verify -in  digicert_com.csr
verify OK
Certificate Request:
    Data:
        Version: 1 (0x0)
        Subject: C = NL, ST = tw, L = tw, O = tw, OU = tw, CN = digicert.com
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (2048 bit)
                Modulus:
                    00:bc:21:e9:3d:30:e8:66:7a:df:c0:85:c7:a2:c4:
                    ab:c0:68:c4:17:e2:02:7a:eb:76:4c:8c:0f:08:09:
                    e6:48:86:82:46:14:8c:22:8c:c9:3f:3b:6b:ac:a9:
                    86:03:12:c3:49:37:01:68:0b:f9:54:db:3c:fc:c8:
                    8e:a1:ec:92:95:f3:49:04:a7:0d:36:12:e9:95:93:
                    34:b6:5a:2b:09:8b:70:ad:b8:da:fc:5e:40:c3:e0:
                    ac:f5:54:84:72:82:30:30:53:39:3d:c6:37:c8:6e:
                    5a:95:e1:6a:99:80:b1:3c:7c:9e:38:fe:29:7f:3d:
                    f9:ba:58:d9:73:58:b6:b2:10:29:30:23:b8:b6:b8:
                    2a:94:15:9c:df:52:dd:ab:81:6e:45:37:83:34:70:
                    99:45:2d:fd:1d:54:8d:1b:fa:9b:1f:40:e5:00:5b:
                    cd:e4:b6:e9:76:4d:50:be:84:2c:e3:7c:2d:1a:7b:
                    9f:c6:85:c9:5d:dd:9f:86:9b:29:d4:80:d1:cb:52:
                    65:91:41:b8:6c:dc:54:a8:84:c7:e2:a5:bc:02:fe:
                    90:49:c6:83:89:fd:6f:1c:80:fe:31:09:ec:1b:52:
                    1f:07:a9:56:39:b1:63:d4:d9:5c:b6:f9:0d:71:ed:
                    3f:3a:5b:d4:84:c3:73:f9:47:cf:e2:f7:f8:f8:6b:
                    26:21
                Exponent: 65537 (0x10001)
        Attributes:
            a0:00
    Signature Algorithm: sha256WithRSAEncryption
         0d:b0:12:c0:e2:e3:0d:04:ab:06:5a:be:d4:ea:19:51:cd:23:
         8b:98:e1:19:c6:ca:03:22:ef:3f:e2:2a:f4:26:53:5f:43:8e:
         c0:a5:38:aa:4d:e8:13:dd:e4:4f:1d:d4:b5:71:ec:02:84:94:
         70:15:90:43:41:54:6b:e6:29:34:d4:7f:b4:1e:8b:57:6e:0d:
         fa:a0:11:cb:98:55:72:fd:93:fa:1b:41:9c:d3:49:52:87:3e:
         19:b9:2d:89:7e:28:a8:a9:59:1c:8a:fc:10:72:01:b4:cc:92:
         9f:47:4e:41:75:88:7e:34:cc:38:5f:0f:7a:c0:95:24:56:91:
         10:8d:66:1b:a1:e8:a6:e5:38:49:fc:3c:e8:c6:b2:26:30:44:
         a1:de:97:85:d9:ba:34:e5:20:a9:77:6e:60:67:56:1d:6b:ee:
         12:99:51:92:7d:c5:74:e0:c7:7a:be:34:2a:11:d4:dd:93:24:
         0d:d6:e3:ea:71:69:e3:dd:40:f5:01:d2:16:02:ae:de:18:c7:
         12:f0:af:a9:f2:14:1f:07:68:23:75:c1:ce:f4:7b:6a:a3:9d:
         15:23:4e:57:4f:8a:51:8d:b9:20:12:de:69:d9:9c:84:68:7d:
         e0:7d:12:87:66:3e:5e:42:19:5c:d7:30:0c:b2:a1:33:8a:16:
         87:6d:9b:76

資料來源
https://www.sslshopper.com/article-most-common-openssl-commands.html

我要發表回答

立即登入回答