diff --git a/web/generate/ssl/index.php b/web/generate/ssl/index.php
new file mode 100644
index 00000000..2d093db2
--- /dev/null
+++ b/web/generate/ssl/index.php
@@ -0,0 +1,112 @@
+ $error) {
+ if ( $i == 0 ) {
+ $error_msg = $error;
+ } else {
+ $error_msg = $error_msg.", ".$error;
+ }
+ }
+ $_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
+ include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/generate_ssl.html');
+ include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+ unset($_SESSION['error_msg']);
+ exit();
+}
+
+// Protect input
+$v_domain = escapeshellarg($_POST['v_domain']);
+$v_email = escapeshellarg($_POST['v_email']);
+$v_country = escapeshellarg($_POST['v_country']);
+$v_state = escapeshellarg($_POST['v_state']);
+$v_locality = escapeshellarg($_POST['v_locality']);
+$v_org = escapeshellarg($_POST['v_org']);
+
+exec (VESTA_CMD."v-generate-ssl-cert ".$v_domain." ".$v_email." ".$v_country." ".$v_state." ".$v_locality." ".$v_org." IT json", $output, $return_var);
+
+// Revert to raw values
+$v_domain = $_POST['v_domain'];
+$v_email = $_POST['v_email'];
+$v_country = $_POST['v_country'];
+$v_state = $_POST['v_state'];
+$v_locality = $_POST['v_locality'];
+$v_org = $_POST['v_org'];
+
+// Check return code
+if ($return_var != 0) {
+ $error = implode('
', $output);
+ if (empty($error)) $error = __('Error code:',$return_var);
+ $_SESSION['error_msg'] = $error;
+ include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/generate_ssl.html');
+ include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+ unset($_SESSION['error_msg']);
+ exit();
+}
+
+// OK message
+$_SESSION['ok_msg'] = __('SSL_GENERATED_OK');
+
+// Parse output
+$data = json_decode(implode('', $output), true);
+unset($output);
+$v_crt = $data[$v_domain]['CRT'];
+$v_key = $data[$v_domain]['KEY'];
+$v_csr = $data[$v_domain]['CSR'];
+
+// Back uri
+$_SESSION['back'] = $_SERVER['REQUEST_URI'];
+
+include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_ssl.html');
+include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
+unset($_SESSION['ok_msg']);
+
+?>
diff --git a/web/inc/i18n/cz.php b/web/inc/i18n/cz.php
index 5ab2ec40..81c57224 100644
--- a/web/inc/i18n/cz.php
+++ b/web/inc/i18n/cz.php
@@ -80,6 +80,7 @@ $LANG['cz'] = array(
'restart' => 'restart',
'update' => 'aktualizovat',
'generate' => 'generovat',
+ 'Generate CSR' => 'Generovat CSR',
'reread IP' => 'číst IP',
'Adding User' => 'Přidání uživatele',
@@ -102,6 +103,7 @@ $LANG['cz'] = array(
'Editing Package' => 'Úprava Package',
'Adding IP address' => 'Editace IP adresy',
'Editing IP Address' => 'Úprava IP adresy',
+ 'Generating CSR' => 'Generování CSR',
'Listing' => 'Výpis',
'Search Results' => 'Výsledky vyhledávání',
@@ -239,6 +241,7 @@ $LANG['cz'] = array(
'SSL Certificate' => 'SSL certifikát',
'SSL Key' => 'SSL klíč',
'SSL Certificate Authority / Intermediate' => 'SSL Certifikační autorita / Intermediate',
+ 'SSL CSR' => 'CSR zádost',
'optional' => 'volitelný',
'internal' => 'interní',
'Statistics Authorization' => 'Statistiky autorizace',
@@ -315,8 +318,13 @@ $LANG['cz'] = array(
'Last 70 lines of %s.%s.log' => 'Posledních 70 řádků %s.%s.log',
'Download AccessLog' => 'Stáhnout AccessLog',
'Download ErrorLog' => 'Stáhnout ErrorLog',
+ 'Country' => 'Země',
+ '2 letter code' => 'dvoupísmenný kód',
+ 'State / Province' => 'Kraj',
+ 'City / Locality' => 'Město / Obec',
+ 'Organization' => 'Organizace',
- '1 account' => '1 účet',
+ '1 account' => '1 účet',
'%s accounts' => '%s účtů',
'1 domain' => '1 doména',
'%s domains' => '%s domén',
@@ -351,6 +359,7 @@ $LANG['cz'] = array(
'CRON_CREATED_OK' => 'Cron job byl úspěšně vytvořen.',
'IP_CREATED_OK' => 'IP adresa %s byla úspěšně vytvořena.',
'PACKAGE_CREATED_OK' => 'Package %s byl úspěšně vytvořen.',
+ 'SSL_GENERATED_OK' => 'SSL certifikát byl úspěšně vygenerován.',
'Changes has been saved.' => 'Změny byly uloženy.',
'Confirmation' => 'Potvrzení',
'DELETE_USER_CONFIRMATION' => 'Opravdu chcete odstranit uživatele %s?',
diff --git a/web/inc/i18n/de.php b/web/inc/i18n/de.php
index 6424a483..0f8b1550 100644
--- a/web/inc/i18n/de.php
+++ b/web/inc/i18n/de.php
@@ -79,6 +79,7 @@ $LANG['de'] = array(
'restart' => 'Neustarten',
'update' => 'Aktualisieren',
'generate' => 'Generieren',
+ 'Generate CSR' => 'CSR generieren',
'reread IP' => 'IP aktualisieren',
'Adding User' => 'Benutzer anlegen',
@@ -101,6 +102,7 @@ $LANG['de'] = array(
'Editing Package' => 'Packet bearbeiten',
'Adding IP address' => 'IP hinzufügen',
'Editing IP Address' => 'IP bearbeiten',
+ 'Generating CSR' => 'CSR generieren',
'Listing' => 'Auflistung',
'Search Results' => 'Suchergebnisse',
@@ -238,6 +240,7 @@ $LANG['de'] = array(
'SSL Certificate' => 'SSL Zertifikat',
'SSL Key' => 'SSL Schlüssel',
'SSL Certificate Authority / Intermediate' => 'SSL Zertifikat Ersteller',
+ 'SSL CSR' => 'CSR-Anfrage',
'optional' => 'Freiwillig',
'internal' => 'Intern',
'Statistics Authorization' => 'Statistik Autorisierung',
@@ -314,8 +317,13 @@ $LANG['de'] = array(
'Last 70 lines of %s.%s.log' => 'Die letzten 70 Zeilen von %s.%s.log',
'Download AccessLog' => 'AccessLog runterladen',
'Download ErrorLog' => 'ErrorLog runterladen',
+ 'Country' => 'Land',
+ '2 letter code' => '2-Buchstaben-Code',
+ 'State / Province' => 'Staat / Provinz',
+ 'City / Locality' => 'Stadt / Lokalitat',
+ 'Organization' => 'Organisation',
- '1 account' => '1 Konto',
+ '1 account' => '1 Konto',
'%s accounts' => '%s Konten',
'1 domain' => '1 Domäne',
'%s domains' => '%s Domänen',
@@ -350,6 +358,7 @@ $LANG['de'] = array(
'CRON_CREATED_OK' => 'Cron Job wurde erfolgreich angelegt.',
'IP_CREATED_OK' => 'IP Adresse %s wurde erfolgreich hinzugefügt.',
'PACKAGE_CREATED_OK' => 'Packet %s wurde erfolgreich angelegt.',
+ 'SSL_GENERATED_OK' => 'SSL zertifikat wurde erfolgreich angelegt.',
'Changes has been saved.' => 'Änderungen wurden gespeichert.',
'Confirmation' => 'Bestätigung',
'DELETE_USER_CONFIRMATION' => '%s wirklich löschen?',
diff --git a/web/inc/i18n/en.php b/web/inc/i18n/en.php
index a24e1d05..3a98b71b 100644
--- a/web/inc/i18n/en.php
+++ b/web/inc/i18n/en.php
@@ -80,6 +80,7 @@ $LANG['en'] = array(
'restart' => 'restart',
'update' => 'update',
'generate' => 'generate',
+ 'Generate CSR' => 'Generate CSR',
'reread IP' => 'reread IP',
'Adding User' => 'Adding User',
@@ -102,6 +103,7 @@ $LANG['en'] = array(
'Editing Package' => 'Editing Package',
'Adding IP address' => 'Adding IP address',
'Editing IP Address' => 'Editing IP Address',
+ 'Generating CSR' => 'Generating CSR',
'Listing' => 'Listing',
'Search Results' => 'Search Results',
@@ -239,6 +241,7 @@ $LANG['en'] = array(
'SSL Certificate' => 'SSL Certificate',
'SSL Key' => 'SSL Key',
'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate',
+ 'SSL CSR' => 'SSL CSR',
'optional' => 'optional',
'internal' => 'internal',
'Statistics Authorization' => 'Statistics Authorization',
@@ -315,6 +318,11 @@ $LANG['en'] = array(
'Last 70 lines of %s.%s.log' => 'Last 70 lines of %s.%s.log',
'Download AccessLog' => 'Download AccessLog',
'Download ErrorLog' => 'Download ErrorLog',
+ 'Country' => 'Country',
+ '2 letter code' => '2 letter code',
+ 'State / Province' => 'State / Province',
+ 'City / Locality' => 'City / Locality',
+ 'Organization' => 'Organization',
'1 account' => '1 account',
'%s accounts' => '%s accounts',
@@ -351,6 +359,7 @@ $LANG['en'] = array(
'CRON_CREATED_OK' => 'Cron job has been created successfully.',
'IP_CREATED_OK' => 'IP address %s has been created successfully.',
'PACKAGE_CREATED_OK' => 'Package %s has been created successfully.',
+ 'SSL_GENERATED_OK' => 'Certificate has been generated successfully.',
'Changes has been saved.' => 'Changes has been saved.',
'Confirmation' => 'Confirmation',
'DELETE_USER_CONFIRMATION' => 'Are you sure to delete user %s?',
diff --git a/web/inc/i18n/es.php b/web/inc/i18n/es.php
index 3325403d..d45e2912 100644
--- a/web/inc/i18n/es.php
+++ b/web/inc/i18n/es.php
@@ -79,6 +79,7 @@ $LANG['es'] = array(
'restart' => 'reiniciar',
'update' => 'actualizar',
'generate' => 'generar',
+ 'Generate CSR' => 'Generar CSR',
'reread IP' => 'releer IP',
'Adding User' => 'Añadiendo Usuario',
@@ -101,6 +102,7 @@ $LANG['es'] = array(
'Editing Package' => 'Editando Plan',
'Adding IP address' => 'Añadiendo Dirección IP',
'Editing IP Address' => 'Editando Dirección IP',
+ 'Generating CSR' => 'Generar solicitud de CSR',
'Listing' => 'Listando',
'Search Results' => 'Resultado de Busqueda',
@@ -238,6 +240,7 @@ $LANG['es'] = array(
'SSL Certificate' => 'Certificado SSL',
'SSL Key' => 'Llave SSL',
'SSL Certificate Authority / Intermediate' => 'Certificado SSL Autoridad / Intermedio',
+ 'SSL CSR' => 'SSL CSR',
'optional' => 'opcional',
'internal' => 'interno',
'Statistics Authorization' => 'Autorización de Estadísticas',
@@ -314,8 +317,13 @@ $LANG['es'] = array(
'Last 70 lines of %s.%s.log' => 'Últimos 70 líneas de %s.%s.log',
'Download AccessLog' => 'Descargar AccessLog',
'Download ErrorLog' => 'Descargar ErrorLog',
+ 'Country' => 'País',
+ '2 letter code' => 'código de 2 letras',
+ 'State / Province' => 'Estado / Provincia',
+ 'City / Locality' => 'Ciudad / Localidad',
+ 'Organization' => 'Organización',
- '1 account' => '1 cuenta',
+ '1 account' => '1 cuenta',
'%s accounts' => '%s cuentas',
'1 domain' => '1 dominio',
'%s domains' => '%s dominios',
@@ -350,6 +358,7 @@ $LANG['es'] = array(
'CRON_CREATED_OK' => 'Trabajo en Cron ha sido creado correctamente.',
'IP_CREATED_OK' => 'Dirección IP %s ha sido creada correctamente.',
'PACKAGE_CREATED_OK' => 'Plan %s ha sido creado correctamente.',
+ 'SSL_GENERATED_OK' => 'SSL certificado ha sido creado correctamente.',
'Changes has been saved.' => 'Los cambios han sido guardados.',
'Confirmation' => 'Confirmación',
'DELETE_USER_CONFIRMATION' => '¿Está seguro que desea eliminar el usuario %s?',
diff --git a/web/inc/i18n/pt.php b/web/inc/i18n/pt.php
index df710066..27177acf 100644
--- a/web/inc/i18n/pt.php
+++ b/web/inc/i18n/pt.php
@@ -79,6 +79,7 @@ $LANG['pt'] = array(
'restart' => 'reiniciar',
'update' => 'atualizar',
'generate' => 'gerar',
+ 'Generate CSR' => 'Gerar CSR',
'reread IP' => 'ler IP novamente',
'Adding User' => 'Adicionando Usuário',
@@ -101,6 +102,7 @@ $LANG['pt'] = array(
'Editing Package' => 'Editando Pacote',
'Adding IP address' => 'Adicionando Endereço IP',
'Editing IP Address' => 'Editando Endereço IP',
+ 'Generating CSR' => 'Gerando CSR',
'Listing' => 'Listando',
'Search Results' => 'Resultados da Busca',
@@ -238,6 +240,7 @@ $LANG['pt'] = array(
'SSL Certificate' => 'Cerificado SSL',
'SSL Key' => 'Chave SSL',
'SSL Certificate Authority / Intermediate' => 'Autoridade Certificadora SSL / Intermediária',
+ 'SSL CSR' => 'SSL CSR (pedido)',
'optional' => 'opcional',
'internal' => 'interno',
'Statistics Authorization' => 'Permissões de Estatística',
@@ -314,8 +317,13 @@ $LANG['pt'] = array(
'Last 70 lines of %s.%s.log' => 'Últimas 70 linhas de %s.%s.log',
'Download AccessLog' => 'Baixar AccessLog',
'Download ErrorLog' => 'Baixar ErrorLog',
+ 'Country' => 'País',
+ '2 letter code' => 'código de duas letras',
+ 'State / Province' => 'Estado / Região',
+ 'City / Locality' => 'Localidade',
+ 'Organization' => 'Organização',
- '1 account' => '1 conta',
+ '1 account' => '1 conta',
'%s accounts' => '%s contas',
'1 domain' => '1 domínio',
'%s domains' => '%s domínio',
@@ -350,6 +358,7 @@ $LANG['pt'] = array(
'CRON_CREATED_OK' => 'Tarefa do Cron adicionada com sucesso.',
'IP_CREATED_OK' => 'Endereço IP %s criado com sucesso.',
'PACKAGE_CREATED_OK' => 'Pacote %s criado com sucesso.',
+ 'SSL_GENERATED_OK' => 'SSL certificado criado sucesso.',
'Changes has been saved.' => 'As alterações foram salvas.',
'Confirmation' => 'Confirmação',
'DELETE_USER_CONFIRMATION' => 'Tem certeza que deseja deletar o usuário %s?',
diff --git a/web/inc/i18n/ro.php b/web/inc/i18n/ro.php
index c50ddc5e..f70b7fa0 100644
--- a/web/inc/i18n/ro.php
+++ b/web/inc/i18n/ro.php
@@ -81,6 +81,7 @@ $LANG['ro'] = array(
'restart' => 'repornește',
'update' => 'actualiza',
'generate' => 'generează',
+ 'Generate CSR' => 'Genera cere CSR',
'reread IP' => 'recitește IP',
'Adding User' => 'Adăugare utilizator',
@@ -103,6 +104,7 @@ $LANG['ro'] = array(
'Editing Package' => 'Editare pachetul',
'Adding IP address' => 'Adăugare adresă IP',
'Editing IP Address' => 'Editare adresă IP',
+ 'Generate CSR' => 'Cerere CSR',
'Listing' => 'Vizualizare',
'Search Results' => 'Rezultatele căutării',
@@ -240,6 +242,7 @@ $LANG['ro'] = array(
'SSL Certificate' => 'Certificat SSL',
'SSL Key' => 'Cheia SSL',
'SSL Certificate Authority / Intermediate' => 'SSL Intermediar / Certificate Authority',
+ 'SSL CSR' => 'Cerere CSR',
'optional' => 'opțional',
'internal' => 'intern',
'Statistics Authorization' => 'Autorizarea statistici',
@@ -316,6 +319,11 @@ $LANG['ro'] = array(
'Last 70 lines of %s.%s.log' => 'Ultimele 70 linii de %s.%s.log',
'Download AccessLog' => 'Descarcă AccessLog',
'Download ErrorLog' => 'Descarcă ErrorLog',
+ 'Country' => 'Țară',
+ '2 letter code' => 'cod de 2 litere',
+ 'State / Province' => 'Județ',
+ 'City / Locality' => 'Oraș / Localitate',
+ 'Organization' => 'Organizație',
'1 account' => '1 utilizator',
'%s accounts' => '%s utilizatori',
@@ -352,6 +360,7 @@ $LANG['ro'] = array(
'CRON_CREATED_OK' => 'Sarcina a fost creată cu succes.',
'IP_CREATED_OK' => '"IP adresa %s a fost creată cu succes.',
'PACKAGE_CREATED_OK' => 'Pachet %s a fost creat cu succes.',
+ 'SSL_GENERATED_OK' => 'SSL certificat a fost generat cu succes.',
'Changes has been saved.' => 'Modificările au fost salvate.',
'Confirmation' => 'Confirmare',
'DELETE_USER_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?',
diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php
index c1bd7e1d..0dc28fa3 100644
--- a/web/inc/i18n/ru.php
+++ b/web/inc/i18n/ru.php
@@ -81,6 +81,7 @@ $LANG['ru'] = array(
'restart' => 'перезапустить',
'update' => 'обновить',
'generate' => 'сгенерировать',
+ 'Generate CSR' => 'Cгенерировать CSR запрос',
'reread IP' => 'перечитать IP',
'Adding User' => 'Добавление аккаунта',
@@ -105,6 +106,7 @@ $LANG['ru'] = array(
'Editing IP Address' => 'Редактирование IP адреса',
'Listing' => 'Просмотр',
'Search Results' => 'Результаты поиска',
+ 'Generating CSR' => 'Генерирование CSR запроса',
'active' => 'активен',
'spnd' => 'заблокировано',
@@ -240,6 +242,7 @@ $LANG['ru'] = array(
'SSL Certificate' => 'SSL сертификат',
'SSL Key' => 'Ключ SSL сертификата',
'SSL Certificate Authority / Intermediate' => 'Центр сертификации SSL / Intermediate',
+ 'SSL CSR' => 'SSL CSR запрос',
'optional' => 'опционально',
'internal' => 'внутренний',
'Statistics Authorization' => 'Ограниченный доступ к статистике',
@@ -316,6 +319,11 @@ $LANG['ru'] = array(
'Last 70 lines of %s.%s.log' => 'Последние 70 строк файла %s.%s.log',
'Download AccessLog' => 'Скачать AccessLog',
'Download ErrorLog' => 'Скачать ErrorLog',
+ 'Country' => 'Страна',
+ '2 letter code' => 'двухбуквенный код',
+ 'State / Province' => 'Область',
+ 'City / Locality' => 'Город / Населенный пункт',
+ 'Organization' => 'Организация',
'1 account' => ' пользователей на странице: 1',
'%s accounts' => 'пользователей на странице: %s',
@@ -352,6 +360,7 @@ $LANG['ru'] = array(
'CRON_CREATED_OK' => 'Задание успешно создано',
'IP_CREATED_OK' => '"IP адрес %s успешно создан.',
'PACKAGE_CREATED_OK' => 'Пакет %s успешно создан.',
+ 'SSL_GENERATED_OK' => 'SSL cертификат был успешно сгенерирован.',
'Changes has been saved.' => 'Изменения сохранены.',
'Confirmation' => 'Подтверждение',
'DELETE_USER_CONFIRMATION' => 'Вы уверены, что хотите удалить пользователя %s?',
diff --git a/web/inc/i18n/ua.php b/web/inc/i18n/ua.php
index 72401279..f40f131c 100644
--- a/web/inc/i18n/ua.php
+++ b/web/inc/i18n/ua.php
@@ -81,6 +81,7 @@ $LANG['ua'] = array(
'restart' => 'перевиконати',
'update' => 'оновити',
'generate' => 'згенерувати',
+ 'Generate CSR' => 'Згенерувати CSR запит',
'reread IP' => 'оновити IP',
'Adding User' => 'Додавання акаунту',
@@ -103,6 +104,7 @@ $LANG['ua'] = array(
'Editing Package' => 'Редагування пакету',
'Adding IP address' => 'Додавання IP адреси',
'Editing IP Address' => 'Редагування IP адреси',
+ 'Generating CSR' => 'Генерування CSR запиту',
'Listing' => 'Перегляд',
'Search Results' => 'Результати пошуку',
@@ -240,6 +242,7 @@ $LANG['ua'] = array(
'SSL Certificate' => 'SSL сертификат',
'SSL Key' => 'Ключ SSL сертифікату',
'SSL Certificate Authority / Intermediate' => 'Центр сертифікації SSL / Intermediate',
+ 'SSL CSR' => 'SSL CSR запит',
'optional' => 'опційно',
'internal' => 'внутрішній',
'Statistics Authorization' => 'Обмежений доступ до статистики',
@@ -316,6 +319,11 @@ $LANG['ua'] = array(
'Last 70 lines of %s.%s.log' => 'Останні 70 ліній файла %s.%s.log',
'Download AccessLog' => 'Завантажити AccessLog',
'Download ErrorLog' => 'Завантажити ErrorLog',
+ 'Country' => 'Країна',
+ '2 letter code' => 'двобуквений код',
+ 'State / Province' => 'Область',
+ 'City / Locality' => 'Місто / Населений пункт',
+ 'Organization' => 'Організація',
'1 account' => ' користувач на сторінці: 1',
'%s accounts' => 'користувачів на сторінці: %s',
@@ -352,6 +360,7 @@ $LANG['ua'] = array(
'CRON_CREATED_OK' => 'Завдання успішно додано',
'IP_CREATED_OK' => '"IP адреса %s успішно створена.',
'PACKAGE_CREATED_OK' => 'Пакет %s успішно створений.',
+ 'SSL_GENERATED_OK' => 'SSL cертификат успішно створено.',
'Changes has been saved.' => 'Зміни збережені.',
'Confirmation' => 'Підтвердження',
'DELETE_USER_CONFIRMATION' => 'Ви впевнені, що хочете видалити користувача %s?',
diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html
index 62c0cd46..920cdec9 100644
--- a/web/templates/admin/add_web.html
+++ b/web/templates/admin/add_web.html
@@ -176,7 +176,8 @@