[%- USE JSON; USE CPIcons; USE SSL; USE CPScalar; # CONSTANTS SET SHOW_HELPER_LINKS_RECORD_COUNT = 10; # Get the data SET list_keys = execute("SSL", "list_keys", { 'api.sort_column' => 'friendly_name' }); SET has_keys_data = list_keys.status && list_keys.data.size; SET list_count = list_keys.data ? list_keys.data.size() : 0; SET RECOMMENDED_KEY_TYPE = SSL.key_types_and_labels().0; SET DEFAULT_KEY_TYPE = SSL.default_key_type() || RECOMMENDED_KEY_TYPE.type; SET MINIMUM_MODULUS_LENGTH = SSL.DEFAULT_KEY_SIZE; CPANEL.CPVAR.dprefix = '../'; %] [% 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/keys.css"] -%] [% PROCESS _assets/_ajaxapp_header.html.tt -%]
[% IF list_count > SHOW_HELPER_LINKS_RECORD_COUNT %] [% END %]

[% locale.maketext('Private Keys') %]

[%- locale.maketext('A private key is used to decrypt information transmitted over SSL. When you create an SSL certificate, the first step is to generate a private key file associated with that SSL certificate. You should generate a private key for each SSL certificate you create. This private key is very important and should be kept confidential. A copy of each private key should be kept in a safe place; there is no way to recover a lost private key.') -%]

[% IF list_keys.data.size %]

[% locale.maketext("Keys on Server") %]

[% IF list_keys.data.size; SET warn_icon = CPIcons.get_common_icon_markup("warning", 16); SET error_icon = CPIcons.get_common_icon_markup("error", 16); FOREACH key = list_keys.data; SET modulus_length = key.modulus_length; SET modulus_class = ''; SET modulus_error = 0; SET keytype = SSL.translate_key_parts_to_label(key); IF key.key_algorithm == 'rsaEncryption' && modulus_length < MINIMUM_MODULUS_LENGTH; modulus_class = 'modulus-critical'; modulus_error = 1; END; -%] [% END %] [% ELSE %] [% END %]
[% locale.maketext('Description') %] [% locale.maketext('ID') %] [% locale.maketext('Key Type') %] [% locale.maketext("Actions") %]
[% key.friendly_name.html().breakOn('\.') %]
[% key.id.html().breakOn('_') %]
[% keytype.html() %]
[% locale.maketext('Edit') %] [% locale.maketext("Delete") %]
[% locale.maketext('There are no private keys on the server.') %]
[% END %]
[% IF list_count > SHOW_HELPER_LINKS_RECORD_COUNT %] [% END %]

[% locale.maketext('Generate a New Private Key.') %]

[%- locale.maketext('You should generate a new key file for each certificate you install.') -%]

[% locale.maketext('[output,strong,Optional]: You can use this field to provide a description for this private key.') %]
[% IF list_count > SHOW_HELPER_LINKS_RECORD_COUNT %] [% END %]

[% locale.maketext('Upload a New Private Key.') %]

[%- locale.maketext('If you have an existing key, paste the key below, or upload it to the server.') -%]

[% locale.maketext('[output,strong,Optional]: You can use this field to provide a description for this private key.') %]
[% locale.maketext("or[comment,this is meant to be a horizontal separator of 2 things stacked vertically]") %]
[% locale.maketext('[output,strong,Optional]: You can use this field to provide a description for this private key.') %]
[% END #wrapper %] [% BLOCK js_block %] [% PROCESS _assets/_ajaxapp_footer.html.tt -%] [% END %]