THE CERTIFICATE GENERATING ENDPOINT

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

Required parameters:

    * request: a json object specifying the certificate request,
    exactly the one which can be sent to /api/v1/cfssl/newkey
    to generate a certificate signing request
    (referring to endpoint_newkey for how to write such object)

Optional parameters:

    * label: a string specifying which signer to be appointed to sign
    the CSR, useful when interacting with cfssl server that stands
    in front of a remote multi-root CA signer
    * profile: a string specifying the signing profile for the signer
    * bundle: a boolean specifying whether to include an "optimal"
    certificate bundle along with the certificate

Result:

    The returned result is a JSON object with four keys:

    * private key: a PEM-encoded private key
    * certificate_request: a PEM-encoded certificate request
    * certificate: a PEM-encoded certificate, signed by the server
    * sums: a JSON object holding both MD5 and SHA1 digests for the certificate
    request and the certificate; note that this is the digest of the DER
    contents of the certificate, not the PEM contents
    * bundle: See the result of endpoint_bundle.txt (only included if the bundle parameter was set)

Example:

    $ curl -d '{ "request": {"hosts":["www.example.com"], "names":[{"C":"US", "ST":"California", "L":"San Francisco", "O":"example.com"}], "CN": "www.example.com"} }' \
          ${CFSSL_HOST}/api/v1/cfssl/newcert  \
          | python -m json.tool

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2487    0  2338  100   149  56536   3603 --:--:-- --:--:-- --:--:-- 57024
{
    "errors": [],
    "messages": [],
    "result": {
        "certificate": "-----BEGIN CERTIFICATE-----\nMIIDRzCCAjGgAwIBAgIIV2zafpyQtp4wCwYJKoZIhvcNAQELMIGMMQswCQYDVQQG\nEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj\nbzETMBEGA1UEChMKQ0ZTU0wgVEVTVDEbMBkGA1UEAxMSQ0ZTU0wgVEVTVCBSb290\nIENBMR4wHAYJKoZIhvcNAQkBFg90ZXN0QHRlc3QubG9jYWwwHhcNMTUwODAzMDYx\nMjAwWhcNMTYwODAyMDYxMjAwWjBqMQswCQYDVQQGEwJVUzEUM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ZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBK/CtZaQ4VliKE+DLIVGLwtSxJgtUKRzGvN1EwI3HRgKDQ3l3urBIzHtUcdMq6HZ\nb8jX0O9fXYUOf4XWggrLk1agLTArBgkqhkiG9w0BCQ4xHjAcMBoGA1UdEQQTMBGC\nD3d3dy5leGFtcGxlLmNvbTAKBggqhkjOPQQDAgNIADBFAiAcvfhXnsLtzep2sKSa\n36W7G9PRbHh8zVGlw3Hph8jR1QIhAKfrgplKwXcUctU5grjQ8KXkJV8RxQUo5KKs\ngFnXYtkb\n-----END CERTIFICATE REQUEST-----\n",
        "private_key": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIJfVVIvXclN1jCWefEwhYYq7y1ya2RjxO5o8QjehD3YdoAoGCCqGSM49\nAwEHoUQDQgAEr8K1lpDhWWIoT4MshUYvC1LEmC1QpHMa83UTAjcdGAoNDeXe6sEj\nMe1Rx0yrodlvyNfQ719dhQ5/hdaCCsuTVg==\n-----END EC PRIVATE KEY-----\n",
        "sums": {
            "certificate": {
                "md5": "E9308D1892F1B77E6721EA2F79C026BE",
                "sha-1": "4640E6DEC2C40B74F46C409C1D31928EE0073D25"
            },
            "certificate_request": {
                "md5": "AA924136405006E36CEE39FED9CBA5D7",
                "sha-1": "DF955A43DF669D38E07BF0479789D13881DC9024"
            }
        }
    },
    "success": true
}
