Description
This function uploads a certificate.
Note:
Due to the limited field length of HTTP GET method calls, you must use the HTTP POST method. For this reason, you cannot use a cPanel or Webmail session URL to call this function.
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 |
crt |
string |
Required The certificate's contents. |
A valid certificate file in Base64 PEM format. |
|
friendly_name |
string |
The certificate's friendly name. |
A valid string. |
TestCert |
Returns
Return |
Type |
Description |
Possible values |
Example |
is_self_signed |
Boolean |
Whether the certificate is self-signed. |
|
1 |
validation_type |
string |
The certificate's validation type. Note: We introduced this return in cPanel & WHM version 56. |
|
dv |
signature_algorithm |
string |
The signature algorithm of the certificate. Note: We introduced this return in cPanel & WHM version 56. |
A valid OID hash algorithm name. |
sha256WithRSAEncryption |
issuer.organizationName |
string |
The issuer's organization name. |
A valid string. |
VeriSign, Inc. |
modulus |
string |
The certificate's modulus. |
A valid string. |
|
not_before |
integer |
The certificate's start time. |
A date in Unix time format. |
1365633490 |
subject.commonName |
string |
The issuer's Common Name or Distinguished Name. |
A valid domain name. |
example.com |
modulus_length |
integer |
The modulus's length. |
A positive integer which measures the length in bits. |
2048 |
not_after |
integer |
The certificate's expiration date. |
A date in Unix time format. |
1397169490 |
created |
integer |
The certificate's creation date. |
A date in Unix time format. |
1366387473 |
domains |
string |
The certificate's domains or list of domains. |
A valid domain or list of domains. |
example.com |
issuer.commonName |
string |
The issuer's Common Name or Distinguished Name. |
A valid string. |
VeriSign Trial Secure Server CA - G2 |
id |
string |
The certificate's ID. |
A valid string. |
|
friendly_name |
string |
The certificate's friendly name. |
A valid string. |
TestCert |