Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function generates a private key file, a Certificate Signing Request (CSR), and a self-signed SSL certificate.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/generatessl?api.version=1&domains=example.com&countryName=US&stateOrProvinceName=Texas&localityName=Houston&organizationName=The%20Justice%20League&emailAddress=username%40example.com&pass=12345luggage&keysize=2048&skip_certificate=0
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/generatessl?api.version=1&domains=example.com&countryName=US&stateOrProvinceName=Texas&localityName=Houston&organizationName=The%20Justice%20League&emailAddress=username%40example.com&pass=12345luggage&keysize=2048&skip_certificate=0
 Command Line
whmapi1 generatessl domains=example.com countryName=US stateOrProvinceName=Texas localityName=Houston organizationName="The Justice League" emailAddress=username%40example.com pass=12345luggage keysize=2048 skip_certificate=0

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
  "data": {
    "csr_id": "example_com_a2459_9d253_d5edb563abb8dd426099bbb358c8f2bc",
    "cert": "-----BEGIN CERTIFICATE-----\n
MIIECTCCAvGgAwIBAgIJAJxzXjtOhnNJMA0GCSqGSIb3DQEBBQUAMIGaMRYwFAYD\n
VQQDEw10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQ4wDAYD\n
VQQIEwVUZXhhczEPMA0GA1UEChMGY1BhbmVsMSgwJgYJKoZIhvcNAQkBFhlsYXVy\n
ZW5jZS5zaW1vbkBjcGFuZWwubmV0MQswCQYDVQQGEwJVUzEQMA4GA1UEBxMHSG91\n
c3RvbjAeFw0xMzA3MTAxNzE5MzVaFw0xNDA3MTAxNzE5MzVaMIGaMRYwFAYDVQQD\n
Ew10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQ4wDAYDVQQI\n
EwVUZXhhczEPMA0GA1UEChMGY1BhbmV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6jfhr10Fv13IXkera7K66YpzybuYMsif5qT08+jdalGDuLMzvr5z0\n
YmBhPSixYtlcVqw\/526sk8EYhR+SwGL7JZFK+20CgYEAhM86zDezjP780Dd+UeZn\n
4U9SH+u\/n71Ew04Z\/N1pXNcrLHuvK5nkAKuea+\/ZbuF\/Mo5KQt6Kz1+Z8N7bqkno\n
CcNNvJTsUMaiFyOoGVEfg13IhEjrh0ZMKsw2VLbUyUDpereDwcCI2clErYwUUcbM\n
PhK5ainxzjcopA1n\/2JPYyUCgYEAk7lT0U3CNtcYv1ENAZdxxkehhxpzKCsBCleS\n
1fjDrQupDOrCSMYiykf1joioQdLxjMW9cUImr5Kw+G1SkfBA6J5DmSeD1Ztf35kp\n
wJIiWlzAYBE7UBIWKtYcqKH5DUrMejI8Kzb6XQzkCxp4JOXTxoZwICxwilVKN6Zl\n
0dhDRPkCgYAqvurPrJyVmZoHdkgPbw19DiSZz5fomqrHcM6DrQXPpeM3oA8JC2TL\n
HM2wok91IfIYHJcC5qsYWQaqtVno77nDAxM5P9W\/6mZCtMErlTxTKMuzKHmI9YUS\n
0RfFOc0Tbq985G9DI0emAL8566dICLOUUuaBlogZHUqrhgd7ML1RLg==\n
-----END RSA PRIVATE KEY-----\n",
    "csrfile": "/var/cpanel/ssl/system/csrs/example_com_a2459_9d253_d5edb563abb8dd426099bbb358c8f2bc.csr",
    "sender_host": "hostname.example.com",
    "certfile": "/var/cpanel/ssl/system/certs/example_com_a2459_9d253_1405012775_521f3620ac92180d24a74813a921b23e.crt",
    "sender": "admin",
    "cert_id": "example_com_a2459_9d253_1405012775_521f3620ac92180d24a74813a921b23e",
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\n
MIIC4DCCAcgCAQAwgZoxFjAUBgNVBAMTDXRlc3RzaW1vbi5jb20xFjAUBgNVBAsT\n
DURvY3VtZW50YXRpb24xDjAMBgNVBAgTBVRleGFzMQ8wDQYDVQQKEwZjUGFuZWwx\n
KDAmBgkqhkiG9w0BCQEWGWxhdXJlbmNlLnNpbW9uQGNwYW5lbC5uZXQxCzAJBgNV\n
BAYTAlVTMRAwDgYDVQQHEwdIb3VzdG9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\n
MIIBCgKCAQEAokWale3PTqaHOK52fBsGFzbTHtxcbyaCL\/hJ0bUpxb36GXF16znl\n
V+t+d4faAlIxPjjiVNL0nsCe60pOHgR\/f+EqB8NYFyvyP4yGUd7TXOBMnSHlBxCZ\n
bOOOuqInbK4T8lRIPaFcpZH9H1ZsKcan7+NyucSa0piORzcT21ngYxaCMzDQ\/2Oq\n
32kW2XalAK28wOUBf5dudYSJvA6gf2mG0Ug3hEfk0nwlxWB0Q3WpKqgqxeVB0PSG\n
csTHPuHileZVL+A4IIuntW9KvPRGFgFMJqypqzPSlEo4veciObGYN313bVATkqu6\n
MWPVM\/MqRxXR3nYn5wT7HblUg3qQ+rnSUwIDAQABoAAwDQYJKoZIhvcNAQEFBQAD\n
ggEBAJ1nEKhjW1E3VVxzOzBmIvBGWhgtpluoD6n2cQjiKrE2S0CwFl4XwVfDdM7Q\n
AhioV89tOJzo+C5SCnm7FYFuHCFz5dnhAP9y2EMheQLhxBJIV4UKfx\/IklsRthFL\n
lPDRgQl5uh2tz0olFkSxzBK82ehwpHO9oIz+92jizNZc4WXduA2Be+fz482WeU+z\n
D7JJzUeJTkF5nE28u2b8OSTDaGknFlrQiLZwwyHshcU3h41kTknUUePpYYvRygP7\n
XR9fwreObbM+mpswnyhwhjead8Rn
Q0TKt+BOd3B1tXqNbDCfKs+BJN666SccvCf2\n1tF3JiQypzC0Flfbsb6prybyJ6c=\n
-----END CERTIFICATE REQUEST-----\n",
    "keyfile": "/var/cpanel/ssl/system/keys/a2459_9d253_02360717d554759ba387fd4a67d30cea.key"
  },
  "metadata": {
    "version": 1,
    "reason": "Key, Certificate, and CSR generated OK",
    "result": 1,
    "command": "generatessl"
  }
}

 Output (XML)
<result>
    <data>
        <csr_id>
            example_com_e0054_da789_96b6625681492b7c43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xiTVXtcnUeS6AyxgMAwGA1UdEwQFMAMBAf8wDQYJKoZI 
hvcNAQEFBQADggEBAHRf+O4RxoHAGLnfR73zeU43+dj8OmsXak7Or65K7ojEyYvl 
1rjcqxsXfHt7W3xwOqLjmPHRzUwAklFOcyb2qQ+kpEUmXNwNlIwzgBSyK+rm1YdU 
y3iKhGQbVIoTPoQRQwTABp3B/1MQDcMcFsneQWeuHCHS9DhCYLcl5IgupzmACDyN 
YNIqb6fqo6RngY7k6AEX1wzwZjWxw71TeLAUJeYPPFjWDZuejlpa7UIHav0Dl447 
rLRkvSYTTmnUwVj+oaejooc2NsxVDy9d/S9Rx0+k1B/i0LCQSV36XvvIzPHP1mYJ 
jpuRyTUqkCS9p1f45mCRUYF/fI4yEYOW2TNQEmw= -----END CERTIFICATE-----
        </cert>
        <key_id>e0054_da789_101721a053024156a34e0df8a9c388d4</key_id>
        <key>
            -----BEGIN RSA PRIVATE KEY----- 
MIIEpAIBAAKCAQEA4AVM6J4Qg3DIFWr/eJ5GRmIATYsJIepKbrDy70sq+udcO8R8 
xxak0oMZ/9mUdpjSNK/fLVTuCO0kxTfQ9VUWJllX7ThD6Zh9ZvlC/nf/OEZLm3Zb 
nBgu8rbC8E9wuDOkKbJLnINgdhtowIydLK2MJ++q62bFV89jkHWTMcKyyqHENo3h 
c+lkpd9vnp8rZTinaVb7nX26uQqAFZYRo+WU0G/NPsq40QVSMoqPxyEz4qXo0hvu 
IlCXmzFZq/6fCVPEKPLhQgMmpdBkMz4dVOazREfqXdjMD2+QXSNiA1AwWr8l0r4r 
tzlxEYDJIR41yXp0xMl3KoolxMyvLBqZy32niQIDAQABAoIBAQCmbGmhWmPsMeoC 
t1WJFxQgD4goE0U6k+Kt7vjbOt14Pk6v/B2yjaju1wSGpO59WLS4/XrwI2se6IXr 
mba7u3VUEgWXLriNHoLy7/SMNTs+ZEKhAMG36eNe3tVdT7busTag31r6sEMGGwCs 
IwpU+azosk0oylWLEX/m/uHWEs1eaIEWWWtgHB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 
PRIVATE KEY-----
        </key>
        <csrfile>
            /var/cpanel/ssl/system/csrs/example_com_e0054_da789_96b6625681492b7c43844b6ec37764de.csr
        </csrfile>
        <sender_host>hostname.example.com</sender_host>
        <certfile>
            /var/cpanel/ssl/system/certs/example_com_e0054_da789_1405012513_401c27501f5e0dd8d1b1d9caa902a0c8.crt
        </certfile>
        <sender>admin</sender>
        <cert_id>
            example_com_e0054_da789_1405012513_401c27501f5e0dd8d1b1d9caa902a0c8
        </cert_id>
        <csr>
            -----BEGIN CERTIFICATE REQUEST----- 
MIIC4DCCAcgCAQAwgZoxFjAUBgNVBAMTDXRlc3RzaW1vbi5jb20xFjAUBgNVBAsT 
DURvY3VtZW50YXRpb24xDjAMBgNVBAgTBVRleGFzMQ8wDQYDVQQKEwZjUGFuZWwx 
KDAmBgkqhkiG9w0BCQEWGWxhdXJlbmNlLnNpbW9uQGNwYW5lbC5uZXQxCzAJBgNV 
BAYTAlVTMRAwDgYDVQQHEwdIb3VzdG9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A 
MIIBCgKCAQEA4AVM6J4Qg3DIFWr/eJ5GRmIATYsJIepKbrDy70sq+udcO8R8xxak 
0oMZ/9mUdpjSNK/fLVTuCO0kxTfQ9VUWJllX7ThD6Zh9ZvlC/nf/OEZLm3ZbnBgu 
8rbC8E9wuDOkKbJLnINgdhtowIydLK2MJ++q62bFV89jkHWTMcKyyqHENo3hc+lk 
pd9vnp8rZTinaVb7nX26uQqAFZYRo+WU0G/NPsq40QVSMoqPxyEz4qXo0hvuIlCX 
mzFZq/6fCVPEKPLhQgMmpdBkMz4dVOazREfqXdjMD2+QXSNiA1AwWr8l0r4rtzlx 
EYDJIR41yXp0xMl3KoolxMyvLBqZy32niQIDAQABoAAwDQYJKoZIhvcNAQEFBQAD 
ggEBAEaCn+rg6qlhp6SEKuZg1G6z1M+1XQoTN3E6bTdM3rD1wXjqtyFfYGTy5Bvv 
gUKrl6t312owJ2si8/K9v/ocVxdjc0rPWSOWScfSc1Od3i1L1YuqbboL2aQSak3y 
gpGnZMHCUED1y4xyABAFOaXUurFiZj5u3P2mBAYGt2ez2afiPlo5YpTRNCoTUlVz 
KNKkyUnptBLOvlwGgerBmOoP4QdVhTSuxO9TECsiPdldE1BVZrlFclDFvoP01jFZ 
WOTWz+k3O202gK4w/tPP2VMVldNFrC0QoENu85ohT1nJj6F3mrM1CZ+1c8zYzr+S 
6aAXFhHE6FweeunRAGjEJggoTPo= -----END CERTIFICATE REQUEST-----
        </csr>
        <keyfile>
            /var/cpanel/ssl/system/keys/e0054_da789_101721a053024156a34e0df8a9c388d4.key
        </keyfile>
    </data>
    <metadata>
        <version>1</version>
        <reason>Key, Certificate, and CSR generated OK</reason>
        <result>1</result>
        <command>generatessl</command>
    </metadata>
</result>

Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

ReturnTypeDescriptionPossible valuesExample
domains string

Required

The certificate's domains.

A comma-delimited list of valid domain names.

example.com
countryNamestring

The certificate's country.

Note:

This parameter is required in cPanel & WHM version 58 and earlier.

If you do not use this parameter, your CSR will not include this field.

A valid two-character ISO-3166 country code.US
stateOrProvinceNamestring

The certificate's state or province name.

Note:

This parameter is required in cPanel & WHM version 58 and earlier.

If you do not use this parameter, your CSR will not include this field.

A valid string that contains the full name of the state or province.Texas
localityNamestring

The certificate's city or locality.

Note:

This parameter is required in cPanel & WHM version 58 and earlier.

If you do not use this parameter, your CSR will not include this field.

A valid string that contains the full name of the city or locality.Houston
organizationNamestring

The certificate's organization.

Note:

This parameter is required in cPanel & WHM version 58 and earlier.

If you do not use this parameter, your CSR will not include this field.

A valid string.The Justice League
organizationalUnitNamestring

The department of the organization that owns the certificate.

If you do not use this parameter, this value defaults to null.

A valid string.Aquaman's Wading Pool
emailAddressstring

The certificate's contact email address.

Note:

This parameter is required in cPanel & WHM version 58 and earlier.

If you do not use this parameter, your CSR will not include this field.

A valid email address.username@example.com
passstring

The certificate's passphrase.

If you do not use this parameter, this value defaults to null.

A secure password.12345luggage
keysizeinteger

The size of the certificate's key.

Note:

This parameter is required in cPanel & WHM version 58 and earlier.

If you do not use this parameter, your CSR will not include this field.

A valid positive integer that represents the size of the key, in bits.2048
skip_certificate integer

Whether the function will skip certificate generation.

Note:

  • The function will still generate a CSR and key and save both to the user's SSLStorage data store .
  • We added this parameter in cPanel & WHM version 62. 

This parameter defaults to 0.

  • 0 — Do not skip certificate generation (generate a certificate).
  • 1 — Skip certificate generation (do not generate a certificate).
0

Returns

ReturnTypeDescriptionPossible valuesExample
csr_idstringThe CSR's ID.A valid string.
 Click to view...

example_com_e0054_da789_96b6625681492b7c43844b6ec37764de

cert

string

The certificate's text.

A valid Secure Sockets Layer (SSL) certificate in Base64 PEM format.
 Click to view...

 -----BEGIN CERTIFICATE----- MIIECTCCAvGgAwIBAgIJAIbGEXBsc2sUMA0GCSqGSIb3DQEBBQUAMIGaMRYwFAYD VQQDEw10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQ4wDAYD VQQIEwVUZXhhczEPMA0GA1UEChMGY1BhbmVsMSgwJgYJKoZIhvcNAQkBFhlsYXVy ZW5jZS5zaW1vbkBjcGFuZWwubmV0MQswCQYDVQQGEwJVUzEQMA4GA1UEBxMHSG91 c3RvbjAeFw0xMzA3MTAxNzE1MTNaFw0xNDA3MTAxNzE1MTNaMIGaMRYwFAYDVQQD Ew10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQ4wDAYDVQQI EwVUZXhhczEPMA0GA1UEChMGY1BhbmVsMSgwJgYJKoZIhvcNAQkBFhlsYXVyZW5j ZS5zaW1vbkBjcGFuZWwubmV0MQswCQYDVQQGEwJVUzEQMA4GA1UEBxMHSG91c3Rv bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOAFTOieEINwyBVq/3ie RkZiAE2LCSHqSm6w8u9LKvrnXDvEfMcWpNKDGf/ZlHaY0jSv3y1U7gjtJMU30PVV FiZZV+04Q+mYfWb5Qv53/zhGS5t2W5wYLvK2wvBPcLgzpCmyS5yDYHYbaMCMnSyt jCfvqutmxVfPY5B1kzHCssqhxDaN4XPpZKXfb56fK2U4p2lW+519urkKgBWWEaPl lNBvzT7KuNEFUjKKj8chM+Kl6NIb7iJQl5sxWav+nwlTxCjy4UIDJqXQZDM+HVTm s0RH6l3YzA9vkF0jYgNQMFq/JdK+K7c5cRGAySEeNcl6dMTJdyqKJcTMrywamct9 p4kCAwEAAaNQME4wHQYDVR0OBBYEFPMow0vJpeoHxiTVXtcnUeS6AyxgMB8GA1Ud IwQYMBaAFPMow0vJpeoHxiTVXtcnUeS6AyxgMAwGA1UdEwQFMAMBAf8wDQYJKoZI hvcNAQEFBQADggEBAHRf+O4RxoHAGLnfR73zeU43+dj8OmsXak7Or65K7ojEyYvl 1rjcqxsXfHt7W3xwOqLjmPHRzUwAklFOcyb2qQ+kpEUmXNwNlIwzgBSyK+rm1YdU y3iKhGQbVIoTPoQRQwTABp3B/1MQDcMcFsneQWeuHCHS9DhCYLcl5IgupzmACDyN YNIqb6fqo6RngY7k6AEX1wzwZjWxw71TeLAUJeYPPFjWDZuejlpa7UIHav0Dl447 rLRkvSYTTmnUwVj+oaejooc2NsxVDy9d/S9Rx0+k1B/i0LCQSV36XvvIzPHP1mYJ jpuRyTUqkCS9p1f45mCRUYF/fI4yEYOW2TNQEmw= -----END CERTIFICATE-----

key_idstringThe private key's ID.A valid string.
 Click to view...
e0054_da789_101721a053024156a34e0df8a9c388d4
keystringThe private key's text.A valid private key in Base64 PEM format.
 Click to view...
 -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEA4AVM6J4Qg3DIFWr/eJ5GRmIATYsJIepKbrDy70sq+udcO8R8 xxak0oMZ/9mUdpjSNK/fLVTuCO0kxTfQ9VUWJllX7ThD6Zh9ZvlC/nf/OEZLm3Zb nBgu8rbC8E9wuDOkKbJLnINgdhtowIydLK2MJ++q62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LODee56iKkzpjXWCsFTq6ar3hD5F3P 63buKdNwhd2GlSPhXFbf+7M5GWW6BZk6rMvv7EOAVice2uvyFm8/4/1WbmF8R+T7 LX1rPLO5p/m701QpvP11TabiwqRkqtSEQhSRF0AKTojSW/yyHCZFAawUhV/Z9EKi HmKb97kCgYAyzmFc2it0HqnsOnRybop603nqMtWGTQO4cxa93HUDpYajuK2K3Dfr xUj6lG3z/oKJGGE2JqgZ6LBAhNJtJWJu2ox3pKGE63QjLJnVwb8y1NFYpe/crbLe PuBwIR0L7drXxfv7O5btY7h6QI2d1/UIAQPAWbxLoTM+ndQ/uPEdfA== -----END RSA PRIVATE KEY-----
csrfilestringThe CSR's location.A valid absolute file path.
 Click to view...
/var/cpanel/ssl/system/csrs/example_com_a2459_9d253_d5edb563abb8dd426099bbb358c8f2bc.csr
sender_hoststringThe host that generated the request.A valid hostname.
hostname.example.com
certfilestringThe certificate's location.A valid absolute file path.
 Click to view...
/var/cpanel/ssl/system/certs/example_com_e0054_da789_1405012513_401c27501f5e0dd8d1b1d9caa902a0c8.crt
senderstringThe username that generated the request.A valid username.
admin
cert_idstringThe certificate's ID.A valid string.
 Click to view...
example_com_a2459_9d253_1405012775_521f3620ac92180d24a74813a921b23e 
csrstringThe CSR's text.A valid CSR file in Base64 PEM format.
 Click to view...

-----BEGIN CERTIFICATE REQUEST----- MIIC4DCCAcgCAQAwgZoxFjAUBgNVBAMTDXRlc3RzaW1vbi5jb20xFjAUBgNVBAsT DURvY3VtZW50YXRpb24xDjAMBgNVBAgTBVRleGFzMQ8wDQYDVQQKEwZjUGFuZWwx KDAmBgkqhkiG9w0BCQEWGWxhdXJlbmNlLnNpbW9uQGNwYW5lbC5uZXQxCzAJBgNV BAYTAlVTMRAwDgYDVQQHEwdIb3VzdG9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEA4AVM6J4Qg3DIFWr/eJ5GRmIATYsJIepKbrDy70sq+udcO8R8xxak 0oMZ/9mUdpjSNK/fLVTuCO0kxTfQ9VUWJllX7ThD6Zh9ZvlC/nf/OEZLm3ZbnBgu 8rbC8E9wuDOkKbJLnINgdhtowIydLK2MJ++q62bFV89jkHWTMcKyyqHENo3hc+lk pd9vnp8rZTinaVb7nX26uQqAFZYRo+WU0G/NPsq40QVSMoqPxyEz4qXo0hvuIlCX mzFZq/6fCVPEKPLhQgMmpdBkMz4dVOazREfqXdjMD2+QXSNiA1AwWr8l0r4rtzlx EYDJIR41yXp0xMl3KoolxMyvLBqZy32niQIDAQABoAAwDQYJKoZIhvcNAQEFBQAD ggEBAEaCn+rg6qlhp6SEKuZg1G6z1M+1XQoTN3E6bTdM3rD1wXjqtyFfYGTy5Bvv gUKrl6t312owJ2si8/K9v/ocVxdjc0rPWSOWScfSc1Od3i1L1YuqbboL2aQSak3y gpGnZMHCUED1y4xyABAFOaXUurFiZj5u3P2mBAYGt2ez2afiPlo5YpTRNCoTUlVz KNKkyUnptBLOvlwGgerBmOoP4QdVhTSuxO9TECsiPdldE1BVZrlFclDFvoP01jFZ WOTWz+k3O202gK4w/tPP2VMVldNFrC0QoENu85ohT1nJj6F3mrM1CZ+1c8zYzr+S

6aAXFhHE6FweeunRAGjEJggoTPo= -----END CERTIFICATE REQUEST-----

keyfilestringThe private key's location.A valid absolute file path.
 Click to view...
/var/cpanel/ssl/system/keys/e0054_da789_101721a053024156a34e0df8a9c388d4.key