THE SIGNING ENDPOINT

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

Required parameters:

    * certificate_request: the CSR bytes to be signed in PEM

Optional parameters:

    * hosts: an array of SAN (subject alternatvie names)
    which overrides the ones in the CSR
    * subject: the certificate subject which overrides
    the ones in the CSR
    * serial_sequence: a string specify the prefix which the generated
    certificate serial should have
    * label: a string specifying which signer to be appointed to sign
    the CSR, useful when interacting with a remote multi-root CA signer
    * profile: a string specifying the signing profile for the signer,
    useful when interacting with a remote multi-root CA signer

Result:

    The returned result is a JSON object with a single key:

    * certificate: a PEM-encoded certificate that has been signed
    by the server.

Example:

    $ curl -d '{"certificate_request": "-----BEGIN CERTIFICATE REQUEST-----\nMIIBUjCB+QIBADBqMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLZXhhbXBsZS5jb20x\nFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEzARBgNVBAgTCkNhbGlmb3JuaWExGDAW\nBgNVBAMTD3d3dy5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\nBK/CtZaQ4VliKE+DLIVGLwtSxJgtUKRzGvN1EwI3HRgKDQ3l3urBIzHtUcdMq6HZ\nb8jX0O9fXYUOf4XWggrLk1agLTArBgkqhkiG9w0BCQ4xHjAcMBoGA1UdEQQTMBGC\nD3d3dy5leGFtcGxlLmNvbTAKBggqhkjOPQQDAgNIADBFAiAcvfhXnsLtzep2sKSa\n36W7G9PRbHh8zVGlw3Hph8jR1QIhAKfrgplKwXcUctU5grjQ8KXkJV8RxQUo5KKs\ngFnXYtkb\n-----END CERTIFICATE REQUEST-----\n"}' \
          ${CFSSL_HOST}/api/v1/cfssl/sign  \
          | python -m json.tool

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1859  100  1287  100   572  27265  12117 --:--:-- --:--:-- --:--:-- 27382
{
{
    "errors": [],
    "messages": [],
    "result": {
        "certificate": "-----BEGIN CERTIFICATE-----\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