Description

This function lists an account's certificates.

Examples


https://hostname.example.com:2083/cpsess##########/execute/SSL/list_certs 

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List an account's certificates.
$SSL_list_certs = $cpanel->uapi(
    'SSL', 'list_certs'
);

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# List an account's certificates.
my $SSL_list_certs = $cpliveapi->uapi(
    'SSL', 'list_certs',
);

<!-- List an account's certificates. -->
[% data = execute( 'SSL', 'list_certs' ); %]
[% FOREACH q = data %]
     <p>
         [% q %]
     </p>
[% END %]

uapi --user=username SSL list_certs

{{
  "messages": null,
  "errors": null,
  "status": 1,
  "data": [
    {
      "is_self_signed": "1",
      "validation_type":"dv",
      "signature_algorithm":"sha256WithRSAEncryption",
      "domain_is_configured": 1,
      "issuer.organizationName": "Example",
      "modulus": "a74f7636fa6ac93ee6836a83a995b55deb5019ea36d7ba3dafb00e38d693acdb0c81b2ff777d6b433a420fae523f127f352a68bcc8b8f2d6ee7b70395bafabd8237ada8164fdddf8376b30375c35d4d4cbcce7d33d08069c17b409176a3689f1ebc97c0b08fe6ae44c19a92ac6d68448e7f1d13f3b360affd4222a51b4f35342de99b5a1fb5548e438f2d824664562a448002eed7fce24dedc7dc3e1ed179973d1dae959b33716eeb410d172708954e00632cbf60a0e26419860c8c0bc285d6bfe4b479de0dd189772a5dae676bd2a92acccc1369821be8cffddd8a7e6ecc061f8a32a9ae0661e4e946ed8e3827b277138d3a76116567cbd129cbd869ef9dddf",
      "subject.commonName": "example.com",
      "not_before": "1365633490",
      "modulus_length": "2048",
      "not_after": "1397169490",
      "created": "1365633490",
      "domains": [
        "example.com"
      ],
      "issuer.commonName": "example.com",
      "friendly_name": "TestCert",
      "id": "example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041"
    }
  ],
  "metadata": {
    "transformed": 1
  }
}

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
is_self_signedBooleanWhether the certificate is self-signed.
  • 1 — Self-signed.
  • 0 — Not self-signed.
1
validation_typestring

The certificate's validation type.

We introduced this return in cPanel & WHM version 56.

  • ev — Extended Validation.
  • ov — Organization Validation.
  • dv — Domain Validation.
  • undef — The system could not parse and determine the certificate's validation type.
dv

signature_algorithm

string

The signature algorithm of the certificate.

We introduced this return in cPanel & WHM version 56.

A valid OID hash algorithm name.
sha256WithRSAEncryption
domain_is_configuredBooleanWhether the certificate is installed on the account.
  • 1 — Installed.
  • 0 — Not installed.
1
issuer.organizationNamestringThe certificate's organization.A valid string.Organization
modulusstringThe certificate's modulus.A valid string.
a74f7636fa6ac93ee6836a83a995b55deb5019ea36d7ba3dafb00e38d693acdb0c81b2ff777d6b433a420fae523f127f352a68bcc8b8f2d6ee7b70395bafabd8237ada8164fdddf8376b30375c35d4d4cbcce7d33d08069c17b409176a3689f1ebc97c0b08fe6ae44c19a92ac6d68448e7f1d13f3b360affd4222a51b4f35342de99b5a1fb5548e438f2d824664562a448002eed7fce24dedc7dc3e1ed179973d1dae959b33716eeb410d172708954e00632cbf60a0e26419860c8c0bc285d6bfe4b479de0dd189772a5dae676bd2a92acccc1369821be8cffddd8a7e6ecc061f8a32a9ae0661e4e946ed8e3827b277138d3a76116567cbd129cbd869ef9dddf 
subject.commonNamestringThe certificate's Common Name.A valid domain name.example.com
not_beforeintegerThe certificate's start time.A date in Unix time format.
1365633490
modulus_lengthintegerThe modulus' length.A positive integer.2048
not_afterintegerThe certificate's expiration time.A date in Unix time format.
1397169490
createdintegerWhen the certificate was created.A date in Unix time format.
1365633887
domainsstringThe domains that the certificate covers.A valid domain or list of domains.example.com
issuer.commonNamestringThe issuer's name.A valid string, typically a domain name.example.com
friendly_namestringThe certificate's friendly name.A valid string.TestCert
idstringThe certificate's ID.A valid string.
example_com_c69ce_37ff5_1397169490_169c717cb2c260281df792788accf041