Create self-signed SSL certificate for service

This function regenerates a self-signed SSL certificate and assigns it to a service.

SecurityBasicAuth
Request
query Parameters
service
required
string

The service.

  • ftp - The ftp service.
  • exim - The exim service.
  • dovecot - The dovecot service.
  • cpanel - The cpanel service.
  • mail_apns - The mail_apns service.
Enum: "ftp" "exim" "dovecot" "cpanel" "mail_apns"
Example: service=cpanel
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/reset_service_ssl_certificate
Request samples
whmapi1 --output=jsonpretty \
  reset_service_ssl_certificate \
  service='cpanel'
Response samples
application/json
{
  • "data": {
    • "certificate": "-----BEGIN CERTIFICATE-----\nMIIDWzCCAkOgAwIBAgIFAiil8fgwDQYJKoZIhvcNAQELBQAwRjEcMBoGA1UEAwwT\ndm01LmRvY3MuY3BhbmVsLm5ldDEmMCQGCSqGSIb3DQEJARYXc3NsQHZtNS5kb2Nz\nLmNwYW5lbC5uZXQwHhcNMTQxMTI0MTg0NDE5WhcNMTUxMTI0MTg0NDE5WjBGMRww\nGgYDVQQDDBN2bTUuZG9jcy5jcGFuZWwubmV0MSYwJAYJKoZIhvcNAQkBFhdzc2xA\ndm01LmRvY3MuY3BhbmVsLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\nggEBAKYsBFQaqfz9ggP2uw+Vm4196hDlgZtx/A7cN7ktDkCzztxpQ1Us6zty0DPB\nKm6aMhi8tvfO1/DU8+L2ybmgXXmAvhMjEdBYtiMd7rUVAo4zuPOzwABJzfTq46Wk\ntQiuT9TZ+051ixFLRyz58ke0jAqqQugeZK1d5q1m82lUow3LU3oPhtYiR31ROU4g\nHt1/p+okMf3T21Bl6lLXQf8EVwUL8c0zrRsLYlhIFGyedaVqoZ47anGFc0U0ZJzw\nBOXnmxbYZY+pExXiNZpxTjUDKgtLvY8CjrHjNgVXSL9S7J8Src4/l7SvKoRjnAit\nKsMh6d/nTC4bukX5FGBph9anoFcCAwEAAaNQME4wHQYDVR0OBBYEFDBzN9RDgdnH\nHx5x7iUeBDX8qQ3yMB8GA1UdIwQYMBaAFDBzN9RDgdnHHx5x7iUeBDX8qQ3yMAwG\nA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACYT6VSDfRxsGIzzoYMlIN9K\nd1pfDqFVFKZecI9M+fc0iAnYYRm5VUpItw5fAoMbrjCL4XMZKImSmkAWc4m9cCDs\nWT4rSEE/Fhv3dUjI3Hg7CFoxwU+Ke+yORsPNCv/9lDjReh9pU120UIttOa1lu9NN\nkT8QcUN0+NAvhj6MTm87VsQBNEpQhddyPuOmtga/zf8HTOcvtbeoRTueVNa4yNvP\n3UI6FLwNWNebzgm5zunahY7svqrTbKkNbQbIFqHrhSZdY5i7+I7Lgi9hfri7nDDk\nl6Dv+Ntm0LKWJNEKuZ8I+QVuJiFIFqF/8Gsqc/8pDuJF3b7UchyqGCXJhnExBR4=\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": "Writer's Guild of America",
      • "issuer_text": "commonName\nhostname.example.com\nemailAddress\nssl@hostname.example.com",
      • "key_algorithm": "rsaEncryption",
      • "modulus": "a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a74016c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db",
      • "modulus_length": 2048,
      • "not_after": 1398805499,
      • "not_before": 1367269499
      },
    • "service": "ftp"
    },
  • "metadata": {
    • "command": "reset_service_ssl_certificate",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}