endpoint_certinfo.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. THE CERTINFO ENDPOINT
  2. Endpoint: /api/v1/cfssl/certinfo
  3. Method: POST
  4. Required parameters:
  5. One of the following parameters is required.
  6. * certificate: the PEM-encoded certificate to be parsed.
  7. * domain: a domain name indicating a remote host to retrieve a
  8. certificate for.
  9. * serial and authority_key_id: a certificate serial number and a
  10. matching authority key to look for in the database
  11. Result:
  12. The certinfo endpoint returns a JSON object with the following
  13. keys:
  14. * subject contains a JSON object corresponding to a PKIX Name, including:
  15. * common_name
  16. * serial_number
  17. * country
  18. * organization
  19. * organizational_unit
  20. * locality
  21. * province
  22. * street_address
  23. * postal_code
  24. * names
  25. * extra_names
  26. * sans is a list of Subject Alternative Names.
  27. * not_before is the certificate's start date.
  28. * not_after is the certificate's end date.
  29. * sigalg is the signature algorithm used to sign the certificate.
  30. Example:
  31. $ curl -d '{"domain": "cloudflare.com"}' \
  32. ${CFSSL_HOST}/api/v1/cfssl/certinfo \
  33. | python -m json.tool
  34. % Total % Received % Xferd Average Speed Time Time Time Current
  35. Dload Upload Total Spent Left Speed
  36. 100 3229 0 3201 100 28 66658 583 --:--:-- --:--:-- --:--:-- 68106
  37. curl: (6) Could not resolve host:
  38. {
  39. "errors": [],
  40. "messages": [],
  41. "result": {
  42. "not_after": "2015-12-31T23:59:59Z",
  43. "not_before": "2015-01-05T00:00:00Z",
  44. "pem": "-----BEGIN CERTIFICATE-----\nMIIHFDCCBfygAwIBAgIQXu3lLLTt9p4yFCuxChTXSTANBgkqhkiG9w0BAQUFADCB\njjELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\nA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxNDAyBgNV\nBAMTK0NPT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yiniCXJvfdaFBUWdw37QZWNHyvVap7vUTXQpsHGkt+KL+0w\nC4/mhoakAMd8n+//pBDtHBWqsnxA7/S6vM9zP0+xRR8vHUsDGj28Ito8839WP18u\nfQrczSznX7YbZjCk++r5GpSCFAsBBh5ZmU9bu9XnzAZ2hlkKec/8HA==\n-----END CERTIFICATE-----\n",
  45. "sans": [
  46. "cloudflare.com",
  47. "www.cloudflare.com"
  48. ],
  49. "sigalg": "SHA1WithRSA",
  50. "subject": {
  51. "country": "US",
  52. "locality": "San Francisco",
  53. "names": [
  54. "4710875",
  55. "US",
  56. "Delaware",
  57. "Private Organization",
  58. "US",
  59. "94107",
  60. "CA",
  61. "San Francisco",
  62. "665 Third Street",
  63. "CloudFlare, Inc.",
  64. "CloudFlare Security",
  65. "COMODO EV Multi-Domain SSL"
  66. ],
  67. "organization": "CloudFlare, Inc.",
  68. "organizational_unit": "CloudFlare Security,COMODO EV Multi-Domain SSL",
  69. "postal_code": "94107",
  70. "province": "CA",
  71. "serial_number": "4710875",
  72. "street_address": "665 Third Street"
  73. }
  74. },
  75. "success": true
  76. }
  77. $curl -d '{"certificate": "-----BEGIN CERTIFICATE-----\nMIIHFDCCBfygAwIBAgIQXu3lLLTt9p4yFCuxChTXSTANBgkqhkiG9w0BAQUFADCB\njjELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\nA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxNDAyBgNV\nBAMTK0NPTU9ETyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZXIgQ0Ew\nHhcNMTUwMTA1MDAwMDAwWhcNMTUxMjMxMjM1OTU5WjCCARwxEDAOBgNVBAUTBzQ3\nMTA4NzUxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIBAhMIRGVs\nYXdhcmUxHTAbBgNVBA8TFFByaXZhdGUg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.tool
  80. % Total % Received % Xferd Average Speed Time Time Time Current
  81. Dload Upload Total Spent Left Speed
  82. 100 5776 0 3201 100 2575 552k 444k --:--:-- --:--:-- --:--:-- 625k
  83. {
  84. "errors": [],
  85. "messages": [],
  86. "result": {
  87. "not_after": "2015-12-31T23:59:59Z",
  88. "not_before": "2015-01-05T00:00:00Z",
  89. "pem": "-----BEGIN CERTIFICATE-----\nMIIHFDCCBfygAwIBAgIQXu3lLLTt9p4yFCuxChTXSTANBgkqhkiG9w0BAQUFADCB\njjELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\nA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxNDAyBgNV\nBAMTK0NPTU9ETyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZXIgQ0Ew\nHhcNMTUwMTA1MDAwMDAwWhcNMTUxMjMxMjM1OTU5WjCCARwxEDAOBgNVBAUTBzQ3\nMTA4NzUxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIBAhMIRGVs\nYXdhcmUxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMQswCQYDVQQGEwJV\nUzEOMAwGA1UEERMFOTQxMDcxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1TYW4gRnJh\nbmNpc2NvMRkwFwYDVQQJExA2NjUgVGhpcmQgU3RyZWV0MRkwFwYDVQQKExBDbG91\nZEZsYXJlLCBJbmMuMRwwGgYDVQQLExNDbG91ZEZsYXJlIFNlY3VyaXR5MSMwIQYD\nVQQLExpDT01PRE8gRVYgTXVsdGktRG9tYWluIFNTTDCCASIwDQYJKoZIhvcNAQEB\nBQADggEPADCCAQoCggEBAN6yBr75KxUUNMatmcL/Ki8K3Z2kmBMq5k+9G2fyViq7\nEB+Rst+RYCDIOwOf9Fb5q82yMC/CLIu3a9hd+tfITcJ2Vh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2qAheT2nJAiBXTr30\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",
  90. "sans": [
  91. "cloudflare.com",
  92. "www.cloudflare.com"
  93. ],
  94. "sigalg": "SHA1WithRSA",
  95. "subject": {
  96. "country": "US",
  97. "locality": "San Francisco",
  98. "names": [
  99. "4710875",
  100. "US",
  101. "Delaware",
  102. "Private Organization",
  103. "US",
  104. "94107",
  105. "CA",
  106. "San Francisco",
  107. "665 Third Street",
  108. "CloudFlare, Inc.",
  109. "CloudFlare Security",
  110. "COMODO EV Multi-Domain SSL"
  111. ],
  112. "organization": "CloudFlare, Inc.",
  113. "organizational_unit": "CloudFlare Security,COMODO EV Multi-Domain SSL",
  114. "postal_code": "94107",
  115. "province": "CA",
  116. "serial_number": "4710875",
  117. "street_address": "665 Third Street"
  118. }
  119. },
  120. "success": true
  121. }