Crt Util

<< Click to Display Table of Contents >>

Navigation:  Managing Syncplify.me Server! > REST API > Admin API > Utility Functions >

Crt Util

Generates a CSR, a private key, and/or imports a CRT into a X.509 certificate.

 

Request

Method

URL

POST

/smserver-default/sms.CrtUtil

RAW

POST /smserver-default/sms.CrtUtil HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

Content-Type: application/json; charset=UTF-8

Accept: */*

Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

 

[

       {

           "command" : "generate",

           "ABits" : 2048,

           "ACountry" : "USA",

           "AState" : "NY",

           "ALoc" : "NY",

           "AOrg" : "MYorg",

           "AOrgUnit" : "myOU",

           "ACommon" : "CommonName",

           "AEmail" : "commo@name.com"

       }

 

]

Explained

"Command":"generate"

 

Generated a private key and a CSR (certificate signature request) to be submitted to a Certification Authority to obtain a X.509 certificate.

 

Response

Method

URL

RAW

Accept-Encoding: synlz,gzip

Content-Type: application/json; charset=UTF-8

 

 

{"result":[

{

       "Result" : 1,

       "Csr" : "-----BEGIN CERTIFICATE REQUEST-----\r\nMIICwDCCAagCAQAwezEMMAoGA1UEBhMDVVNBMQswCQYDVQQIEwJOWTELMAkGA1UE\r\nBxMCTlkxDjAMBgNVBAoTBU1Zb3JnMQ0wCwYDVQQLEwRteU9VMRMwEQYDVQQDEwpD\r\nb21tb25OYW1lMR0wGwYJKoZIhvcNAQkBFg5jb21tb0BuYW1lLmNvbTCCASIwDQYJ\r\nKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPX40zmppu/zQwngMQ1rwWtD9tLuQsHI\r\n+nc8LnHy3N9jT6A2+885t5s76IE8iayzE3/OIu6WJeygmzpDb9/l0d3JmClNxLHx\r\n2R6zSNbQhCv+3WCQJGDJ46nyG98CB39nX7kgCgBTQc2pKVbzed4qhzcDRJN5lBmm\r\nTvv8j3x+wXifH98GpASQE4J60/5LX0mQwOhHzy4g38TdQmS7XP1Lfq3KM3cHvZCf\r\n/kilV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128rRCL\r\nQomve2g61OwofFQ/FSyUAj/8nypIqjdHkD+8fuQ8RQOU1P8UozLlKFttFGEpl6F/\r\nSfMmm52NJq8U4RjvpA0cmoRA0ogaNgZD1XyjTEdeLpauPA0+U6rGXiHR\r\n-----END RSA PRIVATE KEY-----\r\n"

   }

],"id":772674711}

Explained

Csr: the Certificate Signature Request to be submitted to the CA

Key: the Private Key (will be needed later to reassemble the actual certificate once the CA has signed the CSR

 

PHASE 2

 

Request

Method

URL

POST

/smserver-default/sms.CrtUtil

RAW

POST /smserver-default/sms.CrtUtil HTTP/1.1

Cache-Control: no-cache

Connection: Keep-Alive

Pragma: no-cache

Content-Type: application/json; charset=UTF-8

Accept: */*

Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

 

[{

           "command" : "import",

           "Key" : "-----BEGIN RSA PRIVATE KEY-----\nMIIEpgIBAAKCAQEA9fjTOamm7/NDCeAxDWvBa0P20u5Cwcj6dzwucfLc32NPoDb7\nzzm3mzvogTyJrLMTf84i7pYl7KCbOkNv3+XR3cmYKU3EsfHZHrNI1tCEK/7dYJAk\nYMnjqfIb3wIHf2dfuSAKAFNBzakpVvN53iqHNwNEk3mUGaZO+/yPfH7BeJ8f3wak\nBJATgnrT/ktfSZDA6EfPLiDfxN1CZLtc/Ut+rcozdwe9kJ/+SKVWwmmvzLHNV7M5\ntnEKv/ki0ql8KicYbGo1ALrVfO960/sno/7hIv4TI1bIgi4mP3Ojv0jQ4jLN25Zq\ngcjQobxBcRXkAKEohUftaNnVPx/D0+37pR43iwIEAAEAAQKCAQB6PLrz6AyvKGxD\nZyfZbJiFrxPlhUSluzRFtyG5vSDo3xi+HTUMqblGKwKD30roCWKCXDXd7b5RFwut\na8AYO8UM/FdjB2Pdrrvg1uY24w8cMh9gEqIRe6NpXIlfTUnelcfrXzG5Mab9Brkl\nngANWYMy4qvcwknIaW7NKZlBHFkXkLs+ZI360JqEqTpDnDsYhiuvwtWvouG0MHEq\nnZ5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nUjFOJZdmxNPm7Dwe2c41O77U3gf1yT9byYomOduEbYd5NeugigTQUCJ5GtpS2Wm7\nj26EdDojt1o6u+syxUv8INeKxAnT6uiBRtVVGcH0QpYq7PfplB4yg0+BsjWre9U/\nhHox2Fot/ao65tFCpTWxYhlLfnHXjntgowGtm0WQ57TcSw==\n-----END CERTIFICATE-----"

       }

]

Explained

Imports the previously generated Private Key along with the CRT that was the output of the CSR signature by the CA.

 

Response

Method

URL

RAW

Accept-Encoding: synlz,gzip

Content-Type: application/json; charset=UTF-8

 

 

{"result":[

{

       "Result" : 1,

       "Cert" : "MIIEfAIBAzCCBDYGCSqGSIb3DQEHAaCCBCcEggQjMIIEHzCABgkqhkiG9w0BBwag\r\ngDCAAgEAMIAGCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEGMA4ECFutxWJgEQluAgII\r\nAKCABIID0A57GdVyHvX91GF1myLiFBH/1fiZlyI5Yz+2JG9I6dquB62TQ+PVwMtq\r\ncEmg8Y4fJYSW38/gqL3Bm7NcbE6hcfWU/VAxzA7smopFFTpeBH8CyhGSoNnTlruq\r\nU5xyN7xIoxcH5iCkSjINzd1zW3kdex+qB1ljUws2CaPW5/86Ztu+7N3jqWtZgyU3\r\nbG8KSu6ixbh37KCNlkLd/c+avsaxHWFzQYsF5tSGvv6pMZ7CUucSMScr6Rcp0bsK\r\n75KthRK7wcYnA8idio1kuZhFIdM7x4GC17/EaToCiUsUBORe7PkKe78aATiG1lKo\r\n5YiybYdPZlyx2ZGuVnxhDb6EaMd/Sg1d6meOjeen8468OqGpg/Dr6VM4t1QqnBs1\r\nTmIbdPK9J+sEbuPTeV/Drfujy5W+Q8nv+ownWqxhgs5zwIPRDCjPl3nOisdit+Q3\r\nOZeqPkYaED4dydZXx0eOVxSOt0V4HxROpv1K9GwaevBB0O3JOG/ROOsdeT01rLB4\r\n2QJ0+Rg/cS3av5nzCBU7IGVwHg5DlINJJAKdQRBtQbWGgAPjdVCPtfhWzsM4L1Kp\r\nFU7RgZElGbmuaqxCDMrFKepfT7VhklFqd7/Rib+Oxaz9oTQfbZjDL7lRC4Yu5CY3\r\nZeuHRssxvIpNK4o1iPySc81onqvvTGZfTDJTzSDmafqPLrp4UMI5yYxUxKyFI1Oq\r\nArJgfdzHLeWVPcUnhsJezDkl0u7CmekdB9Qe1OLQgNPGiUBr81dNYr2HOR/jC1xN\r\nHDEkjN2JMtAVvtET5pEQssA12o1ESptVnhdn9Zhbksj1wg4aB6KcisRTO1f18eBE\r\nqs/UuGLP7YGjmM37++gN2Q68FXUX3VsNTOXWx5Y41w9wrFrXjRkzZ8MqNsgkdg7o\r\nUcieBZXEYW7jY0PrlvZ+C+Scctul7G3BQoZ2vCYFkhWRhtdUy7lWIf+ivS1lOO5i\r\nbjGFrpkvw7kQq8Y6PTEHUPUzYzoPUewXYcSB8IdXmkm/vb7lhPOeZM664aSjjwDb\r\nvxVhFh1pIFIKvb9FFpOUZ7VBnu3GpPjH2gzXSllfV1MTXLP+cZd1H8QP9CargqUu\r\nz1e5tYNGwGRc+4dPVXyDrZ4uW/9gjFot/X57zpXt9W1noxC80spbml/Zqe252mQv\r\n2jHS0NBor1jmuBcWpdGVGS2BhxLswqF1CcWpCd4o6bUlAfWLaXd638od5v6FgUxF\r\n7bbxiT775ngztK8HMUCKycZwkaG8XvGhATK/TaSqxgml+AqtrxQSF4KWt1dAlsfP\r\nQPv6yv90FxozAg2oBbiER+9bAObx2kUAAAAAAAAAAAAAMD0wITAJBgUrDgMCGgUA\r\nBBQPrzPSLFGbzdqPaZm6SQhMecSbywQURuZobUGi5J7Yolll6hPKiabtvRUCAggA"

   }

],"id":772674711}

Explained

Result:

  1 = success

  any other value different from 1 = error

 

ResultMsg: a friendly message (success or error message) explaining what happened