PHP 读取SSL 的证书数据

读取出来的证书信息

Array
(
    [name] => /CN=ssl.szhcloud.top
    [subject] => Array
        (
            [CN] => ssl.szhcloud.top
        )

    [hash] => b0bf8bd5
    [issuer] => Array
        (
            [C] => CN
            [O] => TrustAsia Technologies, Inc.
            [OU] => Domain Validated SSL
            [CN] => TrustAsia TLS RSA CA
        )

    [version] => 2
    [serialNumber] => 7758449261916608420674059638651585924
    [serialNumberHex] => 05D63914ED05C3FE8335639DBF518584
    [validFrom] => 210416000000Z
    [validTo] => 220415235959Z
    [validFrom_time_t] => 1618531200
    [validTo_time_t] => 1650067199
    [signatureTypeSN] => RSA-SHA256
    [signatureTypeLN] => sha256WithRSAEncryption
    [signatureTypeNID] => 668
    [purposes] => Array
        (
            [1] => Array
                (
                    [0] => 1
                    [1] => 
                    [2] => sslclient
                )

            [2] => Array
                (
                    [0] => 1
                    [1] => 
                    [2] => sslserver
                )

            [3] => Array
                (
                    [0] => 1
                    [1] => 
                    [2] => nssslserver
                )

            [4] => Array
                (
                    [0] => 
                    [1] => 
                    [2] => smimesign
                )

            [5] => Array
                (
                    [0] => 
                    [1] => 
                    [2] => smimeencrypt
                )

            [6] => Array
                (
                    [0] => 
                    [1] => 
                    [2] => crlsign
                )

            [7] => Array
                (
                    [0] => 1
                    [1] => 1
                    [2] => any
                )

            [8] => Array
                (
                    [0] => 1
                    [1] => 
                    [2] => ocsphelper
                )

            [9] => Array
                (
                    [0] => 
                    [1] => 
                    [2] => timestampsign
                )

        )

    [extensions] => Array
        (
            [authorityKeyIdentifier] => keyid:7F:D3:99:F3:A0:47:0E:31:00:56:56:22:8E:B7:CC:9E:DD:CA:01:8A

            [subjectKeyIdentifier] => 16:3B:C2:B3:C3:B3:01:12:3F:D6:A2:8E:4D:DE:1A:7F:F3:5A:53:D3
            [subjectAltName] => DNS:ssl.szhcloud.top
            [keyUsage] => Digital Signature, Key Encipherment
            [extendedKeyUsage] => TLS Web Server Authentication, TLS Web Client Authentication
            [certificatePolicies] => Policy: 2.23.140.1.2.1
  CPS: http://www.digicert.com/CPS

            [authorityInfoAccess] => OCSP - URI:http://statuse.digitalcertvalidation.com
CA Issuers - URI:http://cacerts.digitalcertvalidation.com/TrustAsiaTLSRSACA.crt

            [basicConstraints] => CA:FALSE
            [ct_precert_scts] => Signed Certificate Timestamp:
    Version   : v1(0)
    Log ID    : 46:A5:55:EB:75:FA:91:20:30:B5:A2:89:69:F4:F3:7D:
                11:2C:41:74:BE:FD:49:B8:85:AB:F2:FC:70:FE:6D:47
    Timestamp : Apr 16 03:42:46.327 2021 GMT
    Extensions: none
    Signature : ecdsa-with-SHA256
                30:44:02:20:31:12:98:E1:11:AF:B1:33:CB:41:25:65:
                4C:D4:95:AE:E4:BE:FC:43:2F:21:2E:44:25:54:75:9D:
                F8:2B:38:24:02:20:06:70:D4:5B:4C:30:B9:53:75:69:
                F2:CF:9B:49:C3:39:09:52:E1:EB:3A:92:A3:4B:48:C4:
                40:ED:A3:91:80:67
Signed Certificate Timestamp:
    Version   : v1(0)
    Log ID    : 22:45:45:07:59:55:24:56:96:3F:A1:2F:F1:F7:6D:86:
                E0:23:26:63:AD:C0:4B:7F:5D:C6:83:5C:6E:E2:0F:02
    Timestamp : Apr 16 03:42:46.349 2021 GMT
    Extensions: none
    Signature : ecdsa-with-SHA256
                30:46:02:21:00:B7:74:53:E3:18:54:D1:97:F1:51:33:
                84:F8:90:A5:86:4B:B1:BB:B0:83:93:21:DC:B6:26:0A:
                C5:16:D4:53:E5:02:21:00:AB:4B:6E:C9:C3:F0:36:82:
                C9:70:E2:26:1F:F4:8D:E8:6C:53:7C:81:C1:16:B7:DB:
                E0:99:89:00:95:D3:8C:AB
Signed Certificate Timestamp:
    Version   : v1(0)
    Log ID    : 41:C8:CA:B1:DF:22:46:4A:10:C6:A1:3A:09:42:87:5E:
                4E:31:8B:1B:03:EB:EB:4B:C7:68:F0:90:62:96:06:F6
    Timestamp : Apr 16 03:42:46.328 2021 GMT
    Extensions: none
    Signature : ecdsa-with-SHA256
                30:45:02:20:56:72:47:3C:78:EA:3D:7B:EE:CD:57:01:
                FD:CF:CB:ED:B6:4A:65:11:CC:B6:F7:75:80:5C:5F:20:
                2C:9C:AF:AF:02:21:00:AB:9C:36:5D:6C:27:AD:73:6C:
                42:1D:F0:AA:97:6E:3C:75:05:B4:0E:F5:74:9F:AC:C8:
                05:E4:7F:82:33:0F:6C
        )

)
点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注