Description
This function retrieves a certificate's Certificate Authority (CA) bundle.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
SSL::get_cabundle
— This function retrieves a certificate's CA bundle and hostname.
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 the WHM API method 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 |
crt |
string |
Required The certificate data. |
The certificate file contents, in Unix or Windows format. Important:
|
Returns
Return |
Type |
Description |
Possible values |
Example |
domain |
string |
The certificate's hostname. |
A valid hostname. |
example.com |
bundle |
string |
The signing authority that issued the CA bundle. |
The signing authority's hostname. Note: Self-signed certificates return the account's primary domain. |
example.com |
cab |
string |
The CA bundle data. |
The contents of the CA bundle's file in the/usr/local/cpanel/whostmgr/cabundles/ directory. This data always begins with -----BEGIN CERTIFICATE----- and ends with -----END CERTIFICATE-----. Note: Self-signed certificates return the following string: Sorry, this certificate is self-signed. |
|
reason |
string |
A reason for failure. Note: This function only returns areason value if there was an error. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |