[% # 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"] -%]
[% PROCESS _assets/_ajaxapp_header.html.tt -%]
[% IF list_count > SHOW_HELPER_LINKS_RECORD_COUNT %] [% END %]

[% locale.maketext('SSL Certificate Signing Request') %]

[% 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('Unable to retrieve the certificate signing requests for your account.') %] [% IF list_csrs.errors.0 %] [% list_csrs.errors_as_string() FILTER html %] [% END %]
[% END %]

[% locale.maketext("Certificate Signing Requests on Server") %]

[% IF has_csr_data %] [% FOREACH csr = list_csrs.data %] [% END %] [% ELSE %] [% END %]
[% 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.") %]
[% IF list_count > SHOW_HELPER_LINKS_RECORD_COUNT %] [% END %]

[% locale.maketext("Generate a New Certificate Signing Request (CSR)") %]

[% IF has_keys_error %]
[% locale.maketext('Unable to retrieve the private keys for your account.') %] [% IF list_keys.errors_as_string %] [% list_keys.errors_as_string FILTER html %] [% END %]
[% END %] [% IF !has_keys_data %]
[% locale.maketext('You do not have any Private Keys setup for this account. You must generate or upload a key before you can generate any certificate signing requests.') %]
[% END %]

[% 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.') %]

[% IF has_keys_data -%] [% locale.maketext('Edit') %] [% END -%]
[% locale.maketext('Provide the [output,acronym,FQDN,Fully Qualified Domain Name]s that you are trying to secure, one per line. You may use a wildcard domain by adding an asterisk in a domain name in the form: [output,em,_1].', '*.example.com') %] [% locale.maketext('NOTE: Many [output,acronym,CA,Certificate Authority]s charge a higher price to issue multiple-domain certificates (sometimes called “[output,acronym,UCC,Unified Communications Certificate]s” or “[output,acronym,SAN,subjectAltName] certificates”) and certificates that include wildcard domains.') %]
[% locale.maketext('Provide the complete name for the city or locality. Do not use abbreviations.') %]
[% locale.maketext('Provide the complete name for the state or province. Do not use abbreviations.') %]
[% locale.maketext("Choose the country of origin for the certificate’s company.") %]
[% locale.maketext('Provide the legally-registered name for your business. If your company name includes symbols other than a period or comma, check with your certificate authority to confirm that they are acceptable.') %]
[% locale.maketext('Provide the name of the division or group within the above company. If the division includes symbols other than a period or comma, check with your certificate authority to confirm that they are acceptable.') %]
[% locale.maketext('Provide a valid email address where you can be contacted for verification of domain ownership.') %]
[% locale.maketext('Some certificate authorities may require CSRs to have a passphrase. The certificate authority can use a CSR passphrase to confirm the identity of the person or organization with whom you wish to communicate. CSR passphrases are stored [output,strong,unencrypted] in the CSR. Because of this, and also because you will share this passphrase with a third party, do not use an important password here.') %]
[% INCLUDE _assets/return_link.html.tt return_location='index.html' return_link_text=locale.maketext('Return to SSL Manager') %]
[% END #wrapper %] [% BLOCK js_block %] [% PROCESS _assets/_ajaxapp_footer.html.tt -%] [% END %]