Child pages
  • WHM API 1 Functions - installssl
Skip to end of metadata
Go to start of metadata

Description

This function installs an SSL certificate.

Note:

In cPanel & WHM version 60 and later, Mail SNI is always enabled.

  • Functions that enable Mail SNI succeed with a warning that Mail SNI is always enabled.
  • Functions that disable Mail SNI fail and make no changes.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/installssl?api.version=1&domain=example.com&crt=-----BEGIN%20CERTIFICATE-----%0AMIIDNTCCAh2gAwIBAgIFAY0o0kwwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwL%0AZG9tYWluLnRlc3QwHhcNMTcxMDMxMTUyMjU1WhcNMTgxMDMxMTUyMjU1WjAWMRQw%0AEgYDVQQDDAtkb21haW4udGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC%0AggEBALer6vzwFt%2BO6ooHcXpq%2Bi%2FOVVQEY3oWxrqH6mB%2FPssVSxwcf6bLjoO4so%2Fn%0Adrymhb9mqfkOqYVHwnQ%2Fh2uM%2BIw1NKKDfwOljWcgCS24NykbfQUlW%2FSNDTovdDGl%0AT1Aner090Qse%2B19ta8KS%2F3Akz37bkgqMkPO%2FiEOHlF%2FLbLvjfighkoGco51wc6d7%0AHCQwPWR%2BUenbQWzUwR4%2F4Pqw%2FYrxDAv8O%2FEnNfOGwnCnlnFq4a390VGriqMAngzI%0AlRMVDu4qJGW3dFNStVUm71%2B16ba%2FeIVBQGN2rbgie6Rb6VuHdsqSreea0tSLRxdd%0AFd7A0QMQRvtnqoUv6RZBhefr2t0CAwEAAaOBiTCBhjAdBgNVHQ4EFgQUeitnD4U4%0AMXtmLX53dTAZPENjovwwHwYDVR0jBBgwFoAUeitnD4U4MXtmLX53dTAZPENjovww%0ACQYDVR0TBAIwADA5BgNVHREEMjAwggtkb21haW4udGVzdIIQbWFpbC5kb21haW4u%0AdGVzdIIPd3d3LmRvbWFpbi50ZXN0MA0GCSqGSIb3DQEBCwUAA4IBAQAeD4Fc%2FBwM%0AfJEvlPO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2BcIE%0AcKuYkroIzFWDu9NYiioUI7%2Fa9XdmTvfrT3RSHmup0FoRmlRHD%2FM8%0A-----END%20RSA%20PRIVATE%20KEY-----&ip=192.168.0.20
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/installssl?api.version=1&domain=example.com&crt=-----BEGIN%20CERTIFICATE-----%0AMIIDNTCCAh2gAwIBAgIFAY0o0kwwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwL%0AZG9tYWluLnRlc3QwHhcNMTcxMDMxMTUyMjU1WhcNMTgxMDMxMTUyMjU1WjAWMRQw%0AEgYDVQQDDAtkb21haW4udGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC%0AggEBALer6vzwFt%2BO6ooHcXpq%2Bi%2FOVVQEY3oWxrqH6mB%2FPssVSxwcf6bLjoO4so%2Fn%0Adrymhb9mqfkOqYVHwnQ%2Fh2uM%2BIw1NKKDfwOljWcgCS24NykbfQUlW%2FSNDTovdDGl%0AT1Aner090Qse%2B19ta8KS%2F3Akz37bkgqMkPO%2FiEOHlF%2FLbLvjfighkoGco51wc6d7%0AHCQwPWR%2BUenbQWzUwR4%2F4Pqw%2FYrxDAv8O%2FEnNfOGwnCnlnFq4a390VGriqMAngzI%0AlRMVDu4qJGW3dFNStVUm71%2B16ba%2FeIVBQGN2rbgie6Rb6VuHdsqSreea0tSLRxdd%0AFd7A0QMQRvtnqoUv6RZBhefr2t0CAwEAAaOBiTCBhjAdBgNVHQ4EFgQUeitnD4U4%0AMXtmLX53dTAZPENjovwwHwYDVR0jBBgwFoAUeitnD4U4MXtmLX53dTAZPENjovww%0ACQYDVR0TBAIwADA5BgNVHREEMjAwggtkb21haW4udGVzdIIQbWFpbC5kb21haW4u%0AdGVzdIIPd3d3LmRvbWFpbi50ZXN0MA0GCSqGSIb3DQEBCwUAA4IBAQAeD4Fc%2FBwM%0AfJEvlPO30%2FOp2JJxG92tbgsoY9CKTYoZy0IMHhwOrt%2FB36joYDrOhtiO6Xs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mlRHD%2FM8%0A-----END%20RSA%20PRIVATE%20KEY-----&ip=192.168.0.20
 Command Line
whmapi1 installssl domain=example.com crt=-----BEGIN%20CERTIFICATE-----%0AMIIDNTCCAh2gAwIBAgIFAY0o0kwwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwL%0AZG9tYWluLnRlc3QwHhcNMTcxMDMxMTUyMjU1WhcNMTgxMDMxMTUyMjU1WjAWMRQw%0AEgYDVQQDDAtkb21haW4udGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC%0AggEBALer6vzwFt%2BO6ooHcXpq%2Bi%2FOVVQEY3oWxrqH6mB%2FPssVSxwcf6bLjoO4so%2Fn%0Adrymhb9mqfkOqYVHwnQ%2Fh2uM%2BIw1NKKDfwOljWcgCS24NykbfQUlW%2FSNDTovdDGl%0AT1Aner090Qse%2B19ta8KS%2F3Akz37bkgqMkPO%2FiEOHlF%2FLbLvjfighkoGco51wc6d7%0AHCQwPWR%2BUenbQWzUwR4%2F4Pqw%2FYrxDAv8O%2FEnNfOGwnCnlnFq4a390VGriqMAngzI%0AlRMVDu4qJGW3dFNStVUm71%2B16ba%2FeIVBQGN2rbgie6Rb6VuHdsqSreea0tSLRxdd%0AFd7A0QMQRvtnqoUv6RZBhefr2t0CAwEAAaOBiTCBhjAdBgNVHQ4EFgQUeitnD4U4%0AMXtmLX53dTAZPENjovwwHwYDVR0jBBgwFoAUeitnD4U4MXtmLX53dTAZPENjovww%0ACQYDVR0TBAIwADA5BgNVHREEMjAwggtkb21haW4udGVzdIIQbWFpbC5kb21haW4u%0AdGVzdIIPd3d3LmRvbWFpbi50ZXN0MA0GCSqGSIb3DQEBCwUAA4IBAQAeD4Fc%2FBwM%0AfJEvlPO30%2FOp2JJxG92tbgsoY9CKTYoZy0IMHhwOrt%2FB36joYDrOhtiO6XsRw4Zm%0AAPT8ey9p61kUc6XWs5oU9aifKeAKzWCZV9wQphbY%2F0rQp1YPsVN9tBgiag754HPo%0AbNDhWO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yNC3ic%0A6EH%2FCxUCgYEA5qSo6zf6yJ5tdwm%2FNnrKwvFksapd%2Bi9%2BnAqQHHTFPtlzKHkZ7d5x%0AdklyzAMaoHVoeggtQynUcxcYKjy3i9Nj29P8wN6DhcxJY4Ohdk%2FsAILTcu8QyPzN%0A%2FcYVHWykmFuS55uEa2Mlv6j%2FTBraRJUYfiEl2ZvR77L5gke4GAsCKxcCgYEAy91D%0AlmTy4ka991Ungy%2BVcNTSw9z50l%2Fzu4GxmAlj1fsuX%2F27nbfpsOFjbvlm4xLfW3qM%0A%2BWkrvKXUuxeIbGcBnVlHFWgc6%2BKt5vNoOzUVsm5i90R%2Fg3vhB5cdvuVoTKf2EU4n%0ANVTSaM%2F6zpzBEHSKtTsbx0FiPjS04bk%2Bsi0REisCgYAwy3s1MEWtNd9AxN4gP4Aw%0AF%2FPOppV1PaESkCWG76lfL4%2FuaxhyO5JTjRxtTubONaih0KMKx4m7w5IINYo7WcCR%0AnFqnzyuSHfMUy59YMXZjcUoc0bkCXIGUA9kpvXdhCFafC0bLlVFCKBXC2xd8VPK2%0AlHq2fAHBLWMeDeBDreiKhwKBgHrcweP8uOioK8rI9kQ4xD649MD4B1PDYjfqRObV%0AGecXN27Ak3bNJTjlzTBPfLNzZ0tRg2649JP%2F%2BUI8P4rdVXrIGHANTAjZl2bt4S51%0Aorrjjh9pl9PdL9SMPXAUABTa0RDC4hxhH2HtnkEw9aX%2BJq5sjiQ7AoNs7mpvYxqs%0A0HH7AoGBALhKD8FxNGYLK8oCO27NBdL%2F%2BypxgH5EnwVr%2B3fF49tfC5xpV9Odfu1Z%0ANGNFbjK47PVCLaGKzQUvU7jSAbKt3pDR0IcfiF%2BM6rc86CmZf%2BvAPTN3%2BJwG%2BcIE%0AcKuYkroIzFWDu9NYiioUI7%2Fa9XdmTvfrT3RSHmup0FoRmlRHD%2FM8%0A-----END%20RSA%20PRIVATE%20KEY----- ip=192.168.0.20

 


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.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{  
   "metadata":{  
      "result":1,
      "reason":"The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20". Apache is restarting in the background.\n",
      "command":"installssl",
      "version":1,
      "output":{  
         "raw":"<br>The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20".<br />Apache is restarting in the background."
      }
   },
   "data":{  
      "ip":"192.168.0.20",
      "aliases":[  
         "mail.example.com"
      ],
      "domain":"example.com",
      "action":"install",
      "working_domains":[  
         "example.com"
      ],
      "statusmsg":"The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20". Apache is restarting in the background.\n",
      "user":"example",
      "warning_domains":[  
         "mail.example.com"
      ],
      "message":"The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20". Apache is restarting in the background.\n",
      "extra_certificate_domains":[  

      ],
      "servername":"example.com",
      "status":1,
      "html":"<br>The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20".<br />Apache is restarting in the background."
   }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20". Apache is restarting in the background.</reason>
        <result>1</result>
        <command>installssl</command>
		<output>
			<raw>
				<br>The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20".<br />Apache is restarting in the background."
			</raw>
		</output>
    </metadata>
	<data>
		<ip>192.168.0.20</ip>
		<aliases>
			mail.example.com>
		</aliases>
		<domain>example.com</domain>
		<action>install</action>
		<working_domains>
			example.com
		</working_domains>
		<statusmsg>The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20". Apache is restarting in the background.</statusmeg>
		<user>example</user>
		<warning_domains>
			mail.example.com
		</warning_domains>
		<message>The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20". Apache is restarting in the background.</message>
		<extra_certificate_domains>
			
		</extra_certificate_domains>
		<servername>example.com</servername>
		<status>1</status>
		<html><br>The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20".<br />Apache is restarting in the background.</html>
	</data>
</result>


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain's name.

A valid domain name.example.com
crtstring

Required

The certificate's text.

A valid SSL certificate.

Note:

You must URI-encode this value.

 Click to view...
-----BEGIN CERTIFICATE-----\r\n
MIIEEzCCAvugAwIBAgIJALF/jFpw6p1bMA0GCSqGSIb3DQEBBQUAMIGfMRYwFAYD\r\n 
VQQDEw10ZXN0c2ltb24uY29tMRYwFAYDVQQLEw1Eb2N1bWVudGF0aW9uMQswCQYD\r\n 
VQQGEwJVUzEoMCYGCSqGSIb3DQEJARYZbGF1cmVuY2Uuc2ltb25AY3BhbmVsLm5l\r\n 
dDEUMBIGA1UEChMLY1BhbmVsIEluYy4xDjAMBgNVBAgTBVRleGFzMRAwDgYDVQQH\r\n 
EwdIb3VzdG9uMB4XDTEzMDUxNzE2MTMwN1oXDTE0MDUxNzE2MTMwN1owgZ8xFjAU\r\n 
BgNVBAMTDXRlc3RzaW1vbi5jb20xFjAUBgNVBAsTDURvY3VtZW50YXRpb24xCzAJ\r\n 
BgNVBAYTAlVTMSgwJgYJKoZIhvcNAQkBFhlsYXVyZW5jZS5zaW1vbkBjcGFuZWwu\r\n 
bmV0MRQwEgYDVQQKEwtjUGFuZWwgSW5jLjEOMAwGA1UECBMFVGV4YXMxEDAOBgNV\r\n 
BAcTB0hvdXN0b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDRO0AP\r\n 
N5XtjDqkEyJ6ctfYqUtt9yUXyRuCETFjW6opNLSmZSHeF6L2aZka646lhj02CFyl\r\n 
kzsNSxysN66tY+WZcTmvgPisJdQFpFvjroJZgDjYRV0QqokKdRy/5BU0+tHXoYpj\r\n 
9JOQlbvEWxiGR3R80sL1ma4AfSE6Gv8M/PULTadan51eHaikXqjOXdPJQKuWP3g9\r\n 
FnIuf38WRYwzGrre88qsZrpsMrADX5dotHWgqAf7Tap6xfA4CUAgQo9tldariuVi\r\n 
Bz+sRJ/Sjgxnhw1HYWGttBuBZFhMpdHpPnTJ7DIFMd/FN5gG/tah30SapWpo35Ux\r\n 
3BpJcdUjtazy82K5AgMBAAGjUDBOMB0GA1UdDgQWBBQAlv7/tALOYb7zAXbYG2+9\r\n 
AMI3xjAfBgNVHSMEGDAWgBQAlv7/tALOYb7zAXbYG2+9AMI3xjAMBgNVHRMEBTAD\r\n 
AQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCxzpe71Hc7Es0dqIN7bhIFYIIgcr6wxM6a\r\n 
a9d+QG+QPH0x0KAqV8EgUbZysvyxEF0bPxW3ZAr1Is1wk80PMuU3bToFFVbFFIIr\r\n 
HRNfKLGvxiMXnZA1c6L4N0lowvXHgZxTTUXtDFLXyrcwrLsvUErEV7rbizuxqfPw\r\n 
caRtXn4uc+t6HYuW7yWesBauCWnJNiKbjN/F+uCTurN3QMAeWf3ZJtsfkAgk8dyq\r\n 
R/83a3kDtSPrpt+jX+qdjKEpRtQ5Qpm6XT2gCOQPgnfiUtOCH419pp922P/AAGc+\r\n 
ZUhYoWcRWKw/y6gI7Ru++9+8+wkadL9EbKMZxhVwD5qVm4ZlWK2a\r\n
                    
-----END CERTIFICATE-----%0
keystring

Required

The certificate's key.

A valid private key.

Note:

You must URI-encode this value.

 Click to view...

-----BEGIN RSA PRIVATE KEY-----\r\n
MIIEpAIBAAKCAQEA4AVM6J4Qg3DIFWr/eJ5GRmIATYsJIepKbrDy70sq+udcO8R8\r\n
xxak0oMZ/9mUdpjSNK/fLVTuCO0kxTfQ9VUWJllX7ThD6Zh9ZvlC/nf/OEZLm3Zb\r\n
nBgu8rbC8E9wuDOkKbJLnINgdhtowIydLK2MJ++q62bFV89jkHWTMcKyyqHENo3h\r\n
c+lkpd9vn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sOUpshWX6d\r\n
v1Q4EF1+fbK3YCW+VpCBsB9NAoGAQo+uhNLODee56iKkzpjXWCsFTq6ar3hD5F3P\r\n
63buKdNwhd2GlSPhXFbf+7M5GWW6BZk6rMvv7EOAVice2uvyFm8/4/1WbmF8R+T7\r\n
LX1rPLO5p/m701QpvP11TabiwqRkqtSEQhSRF0AKTojSW/yyHCZFAawUhV/Z9EKi\r\n
HmKb97kCgYAyzmFc2it0HqnsOnRybop603nqMtWGTQO4cxa93HUDpYajuK2K3Dfr\r\n
xUj6lG3z/oKJGGE2JqgZ6LBAhNJtJWJu2ox3pKGE63QjLJnVwb8y1NFYpe/crbLe\r\n
PuBwIR0L7drXxfv7O5btY7h6QI2d1/UIAQPAWbxLoTM+ndQ/uPEdfA==\r\n
-----END RSA PRIVATE KEY-----

cabstring

The certificate's CA bundle.

If you do not use this parameter, the system will automatically determine the appropriate CA bundle file to use.

A valid CA bundle.

Note:

You must URI-encode this value.

 Click to view...
-----BEGIN CERTIFICATE-----\r\n
MIIB+jCCAWMCAgGjMA0GCSqGSIb3DQEBBAUAMEUxCzAJBgNVBAYTAlVTMRgwFgYD\r\n
VQQKEw9HVEUgQ29ycG9yYXRpb24xHDAaBgNVBAMTE0dURSBDeWJlclRydXN0IFJv\r\n
b3QwHhcNOTYwMjIzMjMwMTAwWhcNMDYwMjIzMjM1OTAwWjBFMQswCQYDVQQGEwJV\r\n
UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMRwwGgYDVQQDExNHVEUgQ3liZXJU\r\n
cnVzdCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC45k+625h8cXyv\r\n
RLfTD0bZZOWTwUKOx7pJjTUteueLveUFMVnGsS8KDPufpz+iCWaEVh43KRuH6X4M\r\n
ypqfpX/1FZSj1aJGgthoTNE3FQZor734sLPwKfWVWgkWYXcKIiXUT0Wqx73llt/5\r\n
1KiOQswkwB6RJ0q1bQaAYznEol44AwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABKz\r\n
dcZfHeFhVYAA1IFLezEPI2PnPfMD+fQ2qLvZ46WXTeorKeDWanOB5sCJo9Px4KWl\r\n
IjeaY8JIILTbcuPI9tl8vrGvU9oUtCG41tWW4/5ODFlitppK+ULdjG+BqXH/9Apy\r\n
bW1EDp3zdHSo1TRJ6V6e6bR64eVaH4QwnNOfpSXY\r\n
-----END CERTIFICATE-----
ipstring

The IP address of the certificate's domain.

This parameter defaults to the local IP address for the domain.

A valid IP address.192.168.0.20
enable_sni_for_mailBoolean

Whether SNI for mail is enabled.

Note:

We added this parameter in cPanel & WHM version 11.48.

This parameter defaults to 0.
  • 1 — Enabled.
  • 0 — Disabled.
1

Returns

ReturnTypeDescriptionPossible valuesExample
ipstringThe domain's IP address.A valid IP address.

192.168.0.20

aliasarrayAn array of aliases on the account.A list of aliases on the account.mail.example.com
domainstringThe domain on which the function installed the SSL certificate.A valid domain.example.com
actionstringThe action for the function to execute.install is the only possible value.install
working_domainsarrayAn array of domains on which the function installed the SSL certificates.A list of domains on the server.
statusmsgstringA message of success or a reason for failure.A valid string.
 Click to view...

The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20". Apache is restarting in the background.

userstringThe username for the account on which the function installed the SSL certificate.A valid username.user
warning_domainsarrayAn array of domains associated with the main domain on which the function did not install the SSL certificate.A list of domains on the server.
messagestringA message of success or a reason for failure.A valid string.
The SSL certificate is now installed onto the domain "example.com" using the IP address "192.168.0.20". Apache is restarting in the background.
extra_certificate_domainsarrayAn array of domains that possess additional SSL certificates.A list of domains on the server.
servernamestringThe server's hostname.A valid hostname.example.com
htmlstring

The function's raw output.

A valid string in HTML format.
 Click to view...

Certificate verification passed<br /> <br />

           The Certificate for the domain example.com was installed on the IP 192.168.0.20.
           </html><br><b>Finished SSL Install Process for example.com     
          (www.example.com).</b>

status

Boolean

Whether the function was successful.

  • 1 — Success.
  • 0 — Failure.
1