Description
This function lists SSL certificate information for a cPanel service.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
SSL::get_cn_name
— This function retrieves the best domain to use for SSL for a service.
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 |
domain |
string |
Required The domain name. |
An SSL-enabled domain on the cPanel account. |
example.com |
service |
string |
Required The service for which to retrieve information. |
Note: If you specify imap orpop3, the mailservermust be configured, and cannot be disabled. |
imap |
add_mail_subdomain |
Boolean |
Whether to append mail or www onto the domainvalue in order to find a match. For example, if you specify the domain example.comand enable this option, the function searches for service information from mail.example.com,www.example.com, and example.com. This parameter defaults to 0. |
|
0 |
Returns
Return |
Type |
Description |
Possible values |
Example |
is_self_signed |
Boolean |
Whether the certificate is a self-signed certificate. |
|
1 |
ssldomain |
string |
The domain for which the certificate was issued. |
A valid domain name. |
example.com |
is_wild_card |
Boolean |
Whether the certificate is a wildcard certificate. |
|
0 |
ssldomain_matches_cert |
Boolean |
Whether the certificate information matches the domain. |
|
1 |
cert_match_method |
string |
The type of match. |
|
hostname |
cert_valid_not_after |
integer |
The certificate's expiration date. |
The certificate's expiration date, in Unix time. |
1436471749 |
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if there was an error.
|
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |