Description
This function generates a self-signed SSL certificate.
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 |
domains |
string |
Required The domain(s) for which to generate the certificate. |
A valid string.
Note: If there is more than one domain, this parameter mustbe a comma-separated list. |
example.com |
countryName |
string |
Required The two-letter country code. |
A valid two-letter ISO-3166 country code. |
US |
stateOrProvinceName |
string |
Required The two-letter state or locality abbreviation. |
A valid two-letter string. |
TX |
localityName |
string |
Required The certificate's city name. |
A valid string. |
Houston |
organizationName |
string |
Required The certificate's organization. |
A valid string. |
Organization |
organizationalUnitName |
string |
The certificate's organizational unit or department name. This parameter defaults to an empty string. |
A valid string. |
Department |
emailAddress |
string |
A valid email address to associate with the certificate. This parameter defaults to an empty string. |
A valid email address. |
user@example.com |
key_id |
string |
Required The key's ID. |
A valid string. |
|
friendly_name |
string |
A friendly name for the new certificate. This parameter defaults to the domain's name for which you generated the certificate. |
A valid string. |
TestCert |
Returns
Return |
Type |
Description |
Possible values |
Example |
is_self_signed |
Boolean |
Whether the certificate is self-signed. |
|
1 |
issuer.organizationName |
string |
The certificate's organization name. |
A valid string. |
Organization |
modulus |
string |
The certificate's modulus. |
A valid string. |
|
issuer.commonName |
string |
The certificate's common name. |
A valid domain. |
example.com |
not_before |
string |
When the certificate started. |
A date in Unix time format. |
1415123822 |
modulus_length |
string |
The length of the certificate's modulus. |
A positive integer. |
2048 |
not_after |
string |
When the certificate expired. |
A date in Unix time format. |
1446659822 |
domains |
string |
The domains that the certificate covers. |
A valid domain or domains. |
example.com |
subject.commonName |
string |
The name that issued the certificate. |
Usually, a valid domain. |
example.com |
friendly_name |
string |
The certificate's friendly name. |
A valid string. |
TestCert |
id |
string |
The certificate's ID. |
A valid string. |
|
text |
string |
The certificate's text. |
A valid certificate. |
|