[% # Includes USE CPList; USE JSON; USE SSL; USE Geo; USE CPScalar; SET SYSTEM_DEFAULT_KEY_TYPE = SSL.key_types_and_labels().0; SET DEFAULT_NEW_KEY_TYPE = SSL.default_key_type() || SYSTEM_DEFAULT_KEY_TYPE.type; SET DEFAULT_NEW_KEY_LABEL = ""; FOREACH key_type = SSL.key_types_and_labels(); IF DEFAULT_NEW_KEY_TYPE == key_type.type; DEFAULT_NEW_KEY_LABEL = key_type.label; END; END; # CONSTANTS SET SHOW_HELPER_LINKS_RECORD_COUNT = 10; # Gather the data # Fetch the certificate signing requests for this user SET list_csrs = execute('SSL', 'list_csrs', { 'api.sort_column' => 'commonName', } ); SET has_csr_error = !list_csrs.status; SET has_csr_data = !has_csr_error && list_csrs.data.size; SET creation_date = locale.get_lookup_hash_of_multi_epoch_datetime( list_csrs.data.ofeach('created'), 'date_format_short' ); SET creation_datetime = locale.get_lookup_hash_of_multi_epoch_datetime( list_csrs.data.ofeach('created'), 'datetime_format_short' ); # Fetch the keys for this user. SET list_keys = execute('SSL', 'list_keys', { 'api.sort_column' => 'friendly_name', } ); SET has_keys_error = !list_keys.status; SET has_keys_data = !has_keys_error && list_keys.data.size; SET list_count = list_csrs.data ? list_csrs.data.size() : 0; SET CPANEL.CPVAR.dprefix = '../'; #Domains SET list_mail_domains = execute('WebVhosts','list_domains', { 'api.sort_column' => 'domain', }); %] [% js_code = PROCESS js_block %] [% WRAPPER '_assets/master.html.tt' app_key = 'ssl_tls' include_legacy_scripts = 1 include_cjt = 1 page_js = js_code embed_stylesheets = ["css/ssl.css"] page_stylesheets = ["css2-min/ssl/csrs.css"] -%]
[% locale.maketext('If you obtain a certificate from a trusted SSL provider, you must complete the Certificate Signing Request form to provide the information needed to generate your SSL certificate.') %]
[% IF has_csr_error %]| [% locale.maketext('Domains') %] | [% locale.maketext('Created (UTC)') %] | [% locale.maketext('Description') %] | [% locale.maketext("Actions") %] |
|---|---|---|---|
[% csr.domains.join("\n").html().breakOn('\.').replace("\n",' ') %] |
[% creation_date.${csr.created} %] |
[% csr.friendly_name.html().breakOn('\.') %] |
[% locale.maketext('Edit') %] [% locale.maketext("Delete") %] |
| [% locale.maketext("There are no certificate signing requests on the server.") %] | |||
[% locale.maketext('Use this form to generate a new certificate signing request for your domain. Your SSL certificate authority (CA) will ask for a certificate signing request to complete the certificate purchase. Your CA may require specific information in the form below. Check with the CA’s CSR requirements for the Apache web server.') %]