File: endpoint_certinfo.txt

package info (click to toggle)
golang-github-cloudflare-cfssl 1.6.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,220 kB
  • sloc: asm: 1,936; javascript: 652; makefile: 94; sql: 89; sh: 64; python: 11
file content (131 lines) | stat: -rw-r--r-- 11,807 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
THE CERTINFO ENDPOINT

Endpoint: /api/v1/cfssl/certinfo
Method:   POST

Required parameters:

        One of the following parameters is required.

        * certificate: the PEM-encoded certificate to be parsed.
        * domain: a domain name indicating a remote host to retrieve a
          certificate for.
        * serial and authority_key_id: a certificate serial number and a
          matching authority key to look for in the database

Result:

	The certinfo endpoint returns a JSON object with the following
	keys:

        * subject contains a JSON object corresponding to a PKIX Name, including:
            * common_name
            * serial_number
            * country
            * organization
            * organizational_unit
            * locality
            * province
            * street_address
            * postal_code
            * names
            * extra_names
        * sans is a list of Subject Alternative Names.
        * not_before is the certificate's start date.
        * not_after is the certificate's end date.
        * sigalg is the signature algorithm used to sign the certificate.

Example:

    $ curl -d '{"domain": "cloudflare.com"}' \
          ${CFSSL_HOST}/api/v1/cfssl/certinfo \
          | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3229    0  3201  100    28  66658    583 --:--:-- --:--:-- --:--:-- 68106
curl: (6) Could not resolve host:
{
    "errors": [],
    "messages": [],
    "result": {
        "not_after": "2015-12-31T23:59:59Z",
        "not_before": "2015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+jwuBjW2tocmYNAOgzBzuNNdgBtmqMwkLf\neXRojzANBgkqhkiG9w0BAQUFAAOCAQEAXl5mVmhHA6WcjPhmTMoHGvPCdsGVBWe0\nFr85yjuQsVSKCsZDD3ec01MnNyxwxf6GYFMxysv4j6rC9zlo55fecljtIrPSuftZ\nO4Uvo2a36b5s6sGBqfKQPQbjdbdJvw8yymLHMU25Df3ZZcj0T8bQZKjIZRv5IiDL\nSUlwyxhiiorMrqCPTyiniCXJvfdaFBUWdw37QZWNHyvVap7vUTXQpsHGkt+KL+0w\nC4/mhoakAMd8n+//pBDtHBWqsnxA7/S6vM9zP0+xRR8vHUsDGj28Ito8839WP18u\nfQrczSznX7YbZjCk++r5GpSCFAsBBh5ZmU9bu9XnzAZ2hlkKec/8HA==\n-----END CERTIFICATE-----\n",
        "sans": [
            "cloudflare.com",
            "www.cloudflare.com"
        ],
        "sigalg": "SHA1WithRSA",
        "subject": {
            "country": "US",
            "locality": "San Francisco",
            "names": [
                "4710875",
                "US",
                "Delaware",
                "Private Organization",
                "US",
                "94107",
                "CA",
                "San Francisco",
                "665 Third Street",
                "CloudFlare, Inc.",
                "CloudFlare Security",
                "COMODO EV Multi-Domain SSL"
            ],
            "organization": "CloudFlare, Inc.",
            "organizational_unit": "CloudFlare Security,COMODO EV Multi-Domain SSL",
            "postal_code": "94107",
            "province": "CA",
            "serial_number": "4710875",
            "street_address": "665 Third Street"
        }
    },
    "success": true
}

    $curl -d '{"certificate": "-----BEGIN CERTIFICATE-----\nMIIHFDCCBfygAwIBAgIQXu3lLLTt9p4yFCuxChTXSTANBgkqhkiG9w0BAQUFADCB\njjELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\nA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxNDAyBgNV\nBAMTK0NPTU9ETyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZX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oakAMd8n+//pBDtHBWqsnxA7/S6vM9zP0+xRR8vHUsDGj28Ito8839WP18u\nfQrczSznX7YbZjCk++r5GpSCFAsBBh5ZmU9bu9XnzAZ2hlkKec/8HA==\n-----END CERTIFICATE-----\n"}' \
>           ${CFSSL_HOST}/api/v1/cfssl/certinfo \
>           | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5776    0  3201  100  2575   552k   444k --:--:-- --:--:-- --:--:--  625k
{
    "errors": [],
    "messages": [],
    "result": {
        "not_after": "2015-12-31T23:59:59Z",
        "not_before": "2015-01-05T00:00:00Z",
        "pem": "-----BEGIN CERTIFICATE-----\nMIIHFDCCBfygAwIBAgIQXu3lLLTt9p4yFCuxChTXSTANBgkqhkiG9w0BAQUFADCB\njjELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\nA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxNDAyBgNV\nBAMTK0NPTU9ETyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZXIgQ0Ew\nHhcNMTUwMTA1MDAwMDAwWhcNMTUxMjMxMjM1OTU5WjCCARwxEDAOBgNVBAUTBzQ3\nMTA4NzUxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIBAhMIRGVs\nYXdhcmUxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMQswCQYDVQQGEwJV\nUzEOMAwGA1UEERMFOTQxMDcxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1TYW4gRnJh\nbmNpc2NvMRkwFwYDVQQJExA2NjUgVGhpcmQgU3RyZWV0MRkwFwYDVQQKExBDbG91\nZEZsYXJlLCBJbmMuMRwwGgYDVQQLExNDbG91ZEZsYXJlIFNlY3VyaXR5MSMwIQYD\nVQQLExpDT01PR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uY2xvdWRmbGFyZS5jb20wggEDBgorBgEEAdZ5AgQCBIH0\nBIHxAO8AdQBo9pj4H2SCvjqM7rkoHUz8cVFdZ5PURNEKZ6y7T0/7xAAAAUq6JZ63\nAAAEAwBGMEQCIDnMUQTV5uhtg3wo4WudmHrLsRGAPxgKahZ2qAheT2nJAiBXTr30\neD/Edkl+klFUUYJIN8ntqy1nOgw1cFGDSMcw+wB2AKS5CZC0GFgUh7sTosxncAo8\nNZgE+RvfuON3zQ7IDdwQAAABSrolns0AAAQDAEcwRQIhAOt2rMbzsavA074rVKZ6\nT+OYR0zL2HX6GjI4+ItnguYRAiA9It+jwuBjW2tocmYNAOgzBzuNNdgBtmqMwkLf\neXRojzANBgkqhkiG9w0BAQUFAAOCAQEAXl5mVmhHA6WcjPhmTMoHGvPCdsGVBWe0\nFr85yjuQsVSKCsZDD3ec01MnNyxwxf6GYFMxysv4j6rC9zlo55fecljtIrPSuftZ\nO4Uvo2a36b5s6sGBqfKQPQbjdbdJvw8yymLHMU25Df3ZZcj0T8bQZKjIZRv5IiDL\nSUlwyxhiiorMrqCPTyiniCXJvfdaFBUWdw37QZWNHyvVap7vUTXQpsHGkt+KL+0w\nC4/mhoakAMd8n+//pBDtHBWqsnxA7/S6vM9zP0+xRR8vHUsDGj28Ito8839WP18u\nfQrczSznX7YbZjCk++r5GpSCFAsBBh5ZmU9bu9XnzAZ2hlkKec/8HA==\n-----END CERTIFICATE-----\n",
        "sans": [
            "cloudflare.com",
            "www.cloudflare.com"
        ],
        "sigalg": "SHA1WithRSA",
        "subject": {
            "country": "US",
            "locality": "San Francisco",
            "names": [
                "4710875",
                "US",
                "Delaware",
                "Private Organization",
                "US",
                "94107",
                "CA",
                "San Francisco",
                "665 Third Street",
                "CloudFlare, Inc.",
                "CloudFlare Security",
                "COMODO EV Multi-Domain SSL"
            ],
            "organization": "CloudFlare, Inc.",
            "organizational_unit": "CloudFlare Security,COMODO EV Multi-Domain SSL",
            "postal_code": "94107",
            "province": "CA",
            "serial_number": "4710875",
            "street_address": "665 Third Street"
        }
    },
    "success": true
}