skip to content
Alvin Lucillo

Display cert in readable format

/ 1 min read

To display the human-readable contents of your certificate (i.e., showing the decoded version and not the base64-encoded contents), use the command below. admin.crt is the certificate. This is useful if you want to explore certificate attributes like the issuer name and the certificate name.

cert openssl x509 -in admin.crt -text -noout
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number:
            5e:db:ba:b4:52:45:6b:bb:37:8f:ef:09:37:ce:33:b0:40:ce:08:ac
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN = KUBERNETES-CA
        Validity
            Not Before: Jul 14 12:36:07 2025 GMT
            Not After : Aug 13 12:36:07 2025 GMT
        Subject: CN = kube-admin
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:eb:f6:42:0f:6f:54:5e:2a:3c:bd:26:73:5e:ef:
                    f7:84:a1:1a:59:55:8f:d1:8b:2a:d2:97:b2:2e:8b:
                    8b:5f:d8:95:6a:86:a9:cc:9f:92:86:a7:f3:e2:f5:
                    0f:ce:76:fc:97:59:8c:e6:14:8c:1b:88:36:3d:b2:
                    97:96:c9:ec:7e:a1:ca:37:73:31:ac:d7:1d:bf:7f:
                    28:2f:08:28:0c:9b:1a:76:3b:40:46:b9:b4:6f:a3:
                    ef:c6:d3:6e:c9:2e:4e:a7:2d:e2:1b:24:0d:c7:3a:
                    41:54:1c:aa:76:a6:ca:9e:fe:eb:db:f6:e7:c9:87:
                    d0:0e:80:f6:8b:d5:66:c5:ae:1c:3a:1b:6e:fe:8a:
                    aa:5a:71:a1:4b:d4:5f:18:da:21:73:56:bd:c8:75:
                    52:f9:25:f3:fe:fd:56:d0:da:35:52:ee:ee:62:a2:
                    42:57:d0:47:8c:2c:15:9f:4e:64:d9:58:48:d1:b9:
                    cd:54:b3:41:41:db:23:2e:ce:09:82:2a:96:78:9b:
                    84:50:fe:03:3e:93:49:3e:4d:39:9e:cb:b2:ff:7d:
                    af:f1:b5:f2:58:50:56:fb:1b:31:0d:c7:d2:cb:e4:
                    74:e4:f5:16:9a:fe:56:cf:2b:98:ac:5a:a6:83:f2:
                    17:ae:c1:4e:67:33:c7:d2:5c:09:85:ee:11:2e:8c:
                    18:99
                Exponent: 65537 (0x10001)
    Signature Algorithm: sha256WithRSAEncryption
    Signature Value:
        98:23:9e:5a:bb:07:63:bb:0f:d9:1a:9b:32:3d:eb:09:29:24:
        d0:06:92:70:24:8d:ba:1a:cb:a5:a0:72:7a:eb:0d:78:6c:87:
        14:db:4e:a1:c9:e2:99:a9:8d:b0:eb:9a:01:96:38:ec:79:b7:
        60:98:0b:74:8b:c4:86:4c:92:e5:cb:ec:ef:51:48:37:e5:a5:
        40:bc:4a:10:e1:35:74:05:a7:81:11:f1:6e:5d:44:ac:30:bf:
        b1:e5:51:12:52:68:63:16:b3:4e:fe:c4:03:e4:56:3c:60:24:
        e1:96:f7:69:e2:82:31:e1:37:c4:91:fc:52:32:51:6a:f1:c7:
        71:6d:60:f5:c2:07:02:2c:c7:96:bf:fa:69:27:b4:5b:b3:39:
        b8:a8:53:6b:05:2b:b0:6f:9a:e7:28:24:f0:09:1a:5a:1e:32:
        ee:8f:76:4e:ca:f2:8e:7a:2d:ab:73:bd:19:97:bd:d0:a5:cf:
        7c:d0:84:57:38:ea:a2:11:13:16:21:f8:07:a7:ee:5f:9e:e5:
        d7:40:f7:91:a9:25:16:86:f7:ef:6e:b3:de:c7:7c:16:5f:81:
        d3:c7:99:06:61:1f:61:76:2b:ae:f2:8a:40:f9:a7:9c:32:18:
        25:69:05:85:b1:dd:4a:9c:e6:4a:6b:8a:16:c9:9d:60:53:85:
        d8:25:64:ee