Description
This function generates a self-signed certificate.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
SSL::generate_cert
— This function generates a self-signed SSL certificate.
Note:
Use the SSL::listcrts
function to retrieve the new certificate's information.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
city |
string |
Required The certificate owner's city. |
The name of the city in which the certificate owner resides. |
Houston |
company |
string |
Required The certificate owner's company name. |
The name of the certificate owner's company. |
cPanel |
companydivision |
string |
The certificate owner's division or department within the company. This parameter defaults to an empty string. |
The name of the certificate owner's division or department. |
Documentation |
country |
string |
Required The certificate owner's country. |
The country's two-letter abbreviation. |
US |
|
string |
The certificate owner's email address. This parameter defaults to an empty string. |
A valid email address. |
user@example.com |
host |
string |
Required The certificate's hostname. |
A valid domain or subdomain name.
|
example.com |
state |
string |
Required The certificate owner's state. |
The state's two-letter abbreviation. |
TX |
Returns
Return |
Type |
Description |
Possible values |
Example |
output |
string |
A message of success or a reason for failure. |
|
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |