1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- THE CA CERTIFICATE GENERATING ENDPOINT
- Endpoint: /api/v1/cfssl/init_ca
- Method: POST
- Required parameters:
- * hosts: the list of SANs (subject alternative names) for the
- requested CA certificate
- * names: the certificate subject for the requested CA certificate
- Optional parameters:
- * CN: the common name for the certificate subject in the requested
- CA certificate.
- * key: the key algorithm and size for the newly generated private key,
- default to ECDSA-256
- * ca: the CA configuration of the requested CA, including CA pathlen
- and CA default expiry
- Result:
- The returned result is a JSON object with three keys:
- * private key: a PEM-encoded CA private key
- * certificate: a PEM-encoded self-signed CA certificate
- Example:
- $ curl -d '{"hosts":["www.example.com"], "names":[{"C":"US", "ST":"California", "L":"San Francisco", "O":"example.com"}], "CN": "www.example.com"}' \
- ${CFSSL_HOST}/api/v1/cfssl/init_ca \
- | python -m json.tool
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 100 1287 100 1152 100 135 36806 4313 --:--:-- --:--:-- --:--:-- 37161
- {
- "errors": [],
- "messages": [],
- "result": {
- "certificate": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIHSuWpkTLyX4pucRtUATncQaTYtTRJNDpt8j7cnBeVceoAoGCCqGSM49\nAwEHoUQDQgAEqj9wJFCAqvcLRRB+qSc/jxLgUHLTMUi6ko/JupAWI1V5SjZxuL4u\nh6HS3VE4fvCdcfa06PAAKiJBNsfPBcS/Ig==\n-----END EC PRIVATE KEY-----\n",
- "private_key": "-----BEGIN CERTIFICATE-----\nMIICMDCCAdagAwIBAgIIOdP968SD1xgwCgYIKoZIzj0EAwIwajELMAkGA1UEBhMC\nVVMxFDASBgNVBAoTC2V4YW1wbGUuY29tMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2Nv\nMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRgwFgYDVQQDEw93d3cuZXhhbXBsZS5jb20w\nHhcNMTUwODAzMDYyODAwWhcNMjAwODAxMDYyODAwWjBqMQswCQYDVQQGEwJVUzEU\nMBIGA1UEChMLZXhhbXBsZS5jb20xFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEzAR\nBgNVBAgTCkNhbGlmb3JuaWExGDAWBgNVBAMTD3d3dy5leGFtcGxlLmNvbTBZMBMG\nByqGSM49AgEGCCqGSM49AwEHA0IABKo/cCRQgKr3C0UQfqknP48S4FBy0zFIupKP\nybqQFiNVeUo2cbi+Loeh0t1ROH7wnXH2tOjwACoiQTbHzwXEvyKjZjBkMA4GA1Ud\nDwEB/wQEAwIABjASBgNVHRMBAf8ECDAGAQH/AgECMB0GA1UdDgQWBBTH3jEBAIFt\nFFgJAI9lm8ktqxNt+DAfBgNVHSMEGDAWgBTH3jEBAIFtFFgJAI9lm8ktqxNt+DAK\nBggqhkjOPQQDAgNIADBFAiEA7s2UgPNJuQLzcXYNTQxhYqFq2+rbrJGC0WhYE8+r\n1yACIC5fsyyNNlw5HbSv4MDBwu3ozsMdfmoQTLVyijW/LC9r\n-----END CERTIFICATE-----\n"
- },
- "success": true
- }
|