This function installs a new SSL certificate on a service.
Important:
You must restart the selected service after you install a new SSL certificate.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ install_service_ssl_certificate \ service='cpanel' \ crt='-----BEGIN CERTIFICATE----- MIIE3f4g5h7j73f235gy54hvcNAQELBQAwgYYxEDAOBgNVBAcMB2hvd097342boi0w389w0BCQEWEmMubGFycnl8293rhqurpg9qfgm5ldDEOMAwGA1UECAwFdGV4YXMxCzAJBgNVBAYTAlVTMSEwHwYDVQQDDBhiaW5hcnlhZ2Fpbi5jcGFuZWwubmluamExDzANBgNVBAoMBmNwYW5lbDAeFw0yMDA1MTgxODQ3NTFaFw0yMTA1MTgxODQ3NTFaMIGGMRAwDgYDVQQHDAdob3VzdG9uMSEwHwYJKoZIhvcNAQkBFhJjLmxhcnJ5QGNwYW5lbC5uZXQxDjAMBgNVBAgMBXRleGFzMQswCQYDVQQGEwJVUzEhMB8GA1UEAwwYYmluYXJ5YWdhaW4uY3BhbmVsLm5pbmphMQ8wDQYDVQQKDAZjcGFuZWwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3i1fOlIUoURJf4BkMgoVvCeq5GZjzuCl6WXzz5WsADYUl84UzgXJIWtwBoTc2l32zyeWkIAkM/eNR12YMb0kXbgihbZtEsH0XimqcXmtiicoM3tjBi6u0cDEFr8TMdI396oArnnTc0CASfdXUGGtReZ6vOwxXOPPK5nYCvyFqBl1n0pQ2AV/Co9/WwhOCvV/Bm9aTzueZrbYB/9uW31LOpjs+0s1QNGHv6PTvH8HZFW/7Z9M3gSwUxfOOOQHEiiHRWfb/UqcTZZxjZhfY/IN6/SOsc3Z2t2KmQ5XI6ijCrjjJeaZSQYsge8LpHskr8G3WeTV9M9+1YnI7GRqs3+GdAgMBAAGjggEsMIIBKDAdBgNVHQ4EFgQUYWWThQj2tRL5PNkdPhUJdqEIcrswCQYDVR0TBAIwADCBtwYDVR0jBIGvMIGsgBRhZZOFCPa1Evk82R0+FQl2oQhy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YnI7\nGRqs3+GdAgMBAAGjggEsMIIBKDAdBgNVHQ4EFgQUYWWThQj2tRL5PNkdPhUJdqEI\ncrswCQYDVR0TBAIwADCBtwYDVR0jBIGvMIGsgBRhZZOFCPa1Evk82R0+FQl2oQhy\nu6GBjKSBiTCBhjEQMA4GA1UEBwwHaG91c3RvbjEhMB8GCSqGSIb3DQEJARYSYy5s\nYXJyeUBjcGFuZWwubmV0MQ4wDAYDVQQIDAV0ZXhhczELMAkGA1UEBhMCVVMxITAf\nBgNVBAMMGGJpbmFyeWFnYWluLmNwYW5lbC5uaW5qYTEPMA0GA1UECgwGY3BhbmVs\nggUCGG94JTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwIwYDVR0RBBww\nGoIYYmluYXJ5YWdhaW4uY3BhbmVsLm5pbmphMA0GCSqGSIb3DQEBCwUAA4IBAQBh\nKmds+XDTycHc2bsSH+zDkWIw58+J26Re9Q9VnUcrSKtV3mmtW88r8FuEHEZdAOzF\nPTJ3Tdd1fha15wuS5dzOV+bCRrDTvJmD4vRPkQ5TSdyJgpIjpjwiOP1+ZwaF7xZ+\nFLMTcEl8SXM+lkoKEUQpHFKyQ0zGIaLCVt0QyXx16lesPMgPeb/KRXJPy7ZrUtyF\n0z0LgvOSDGNsGt4rD8FVgtdHRlMJf/XIoFeV5Zk+rHNoCXIQXh4nBzM8X2r3IrQ1\nQh0Z3njN2Ld8ZUlxsWctlLzvzmjARzIzvbglO3wod5XoRLS+fU6oVyQ9yuQLGG6r\n6Y7iBYSHfAO8e0pLkp7G\n-----END CERTIFICATE-----",
- "certificate_info": {
- "domains": [
- "example.com"
], - "ecdsa_curve_name": null,
- "ecdsa_public": null,
- "is_self_signed": 1,
- "issuer.commonName": "example.com",
- "issuer.organizationName": "Organization",
- "issuer_text": "localityName\ncity\nemailaddress\nc.example@example.com\nstateOrProvinceName\nstate\ncountryName\nUS\ncommonName\nhostname\norganizationName\ncpanel",
- "key_algorithm": "rsaEncryption",
- "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
- "modulus_length": 2048,
- "not_after": 1601467200,
- "not_before": 1601467200,
- "signature_algorithm": "sha256WithRSAEncryption",
- "validation_type": "dv"
}, - "service": "cpanel",
- "service_description": "Calendar, cPanel, WebDisk, Webmail, and WHM Services"
}, - "metadata": {
- "command": "install_service_ssl_certificate",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}