Description
This function retrieves information about a certificate that is installed on a domain's IP address.
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. |
A valid domain name. |
example.com
|
Returns
Return |
Type |
Description |
Possible values |
Example |
certificate |
hash |
A hash of the certificate information. |
This hash includes the owner,is_self_signed,issuer.organizationName, modulus,subject.commonName, not_before,modulus_length, host,signature_algorithm,validation_type, not_after,created, domains, text,issuer.commonName, id, andissuer_text returns. |
|
owner |
string |
The account owner. The function returns this value in the certificatehash. |
A valid username. |
example |
is_self_signed |
Boolean |
Whether the certificate is self- signed. The function returns this value in the certificatehash. |
|
1 |
validation_type |
string |
The certificate's validation type. Note: We introduced this return in cPanel & WHM version 56. The function returns this value in the certificatehash. |
|
dv |
signature_algorithm
|
string |
The signature algorithm of the certificate. Note: We introduced this return in cPanel & WHM version 56. The function returns this value in thecertificatehash. |
A valid OID hash algorithm name. |
sha256WithRSAEncryption |
issuer.organizationName |
string |
The certificate's organization. The function returns this value in the certificatehash. |
A valid string. |
Organization |
modulus |
string |
The certificate's modulus. The function returns this value in the certificatehash. |
A valid string. |
|
subject.commonName |
string |
The certificate's Common Name. The function returns this value in the certificatehash. |
A valid domain name. |
example.com |
not_before |
integer |
The certificate's start time. The function returns this value in the certificatehash. |
A date in Unix time format. |
1365633490 |
modulus_length |
integer |
The modulus' length. The function returns this value in the certificatehash. |
A positive integer. |
2048 |
host |
string |
The IP address' hostname. The function returns this value in the certificatehash. |
A valid domain name. |
example.com |
not_after |
integer |
The certificate's expiration time. The function returns this value in the certificatehash. |
A date in Unix time format. |
1397169490 |
created |
integer |
When the certificate was created. The function returns this value in the certificatehash. |
A date in Unix time format. |
1365633887 |
domains |
array |
The domains that the certificate covers. The function returns this value in the certificatehash. |
A valid domain or list of domains. |
example.com |
text |
string |
The certificate's text. The function returns this value in the certificatehash. |
A valid certificate file in Base64 PEM format. |
|
issuer.commonName |
string |
The issuer's name. The function returns this value in the certificatehash. |
A valid string, typically a domain name. |
example.com |
id |
string |
The certificate's ID. The function returns this value in the certificatehash. |
A valid string |
|
issuer_text |
string |
The X.509 information about the issuer. The function returns this value in the certificatehash. |
A string that contains CSR information. |
|
host |
string |
The issuer's hostname. |
A valid domain name. |
example.com |