fixed bug with missing new line in ssl certificate

This commit is contained in:
Serghey Rodin 2012-12-11 23:36:26 +02:00
commit 1482a7e8fd
2 changed files with 6 additions and 0 deletions

View file

@ -182,6 +182,7 @@ top_panel($user,$TAB);
if (!empty($_POST['v_ssl_crt'])) {
$fp = fopen($tmpdir."/".$_POST['v_domain'].".crt", 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_crt']));
fwrite($fp, "\n");
fclose($fp);
}
@ -189,6 +190,7 @@ top_panel($user,$TAB);
if (!empty($_POST['v_ssl_key'])) {
$fp = fopen($tmpdir."/".$_POST['v_domain'].".key", 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_key']));
fwrite($fp, "\n");
fclose($fp);
}
@ -196,6 +198,7 @@ top_panel($user,$TAB);
if (!empty($_POST['v_ssl_ca'])) {
$fp = fopen($tmpdir."/".$_POST['v_domain'].".ca", 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_ca']));
fwrite($fp, "\n");
fclose($fp);
}

View file

@ -272,6 +272,7 @@ top_panel($user,$TAB);
if (!empty($_POST['v_ssl_crt'])) {
$fp = fopen($tmpdir."/".$_POST['v_domain'].".crt", 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_crt']));
fwrite($fp, "\n");
fclose($fp);
}
@ -279,6 +280,7 @@ top_panel($user,$TAB);
if (!empty($_POST['v_ssl_key'])) {
$fp = fopen($tmpdir."/".$_POST['v_domain'].".key", 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_key']));
fwrite($fp, "\n");
fclose($fp);
}
@ -286,6 +288,7 @@ top_panel($user,$TAB);
if (!empty($_POST['v_ssl_ca'])) {
$fp = fopen($tmpdir."/".$_POST['v_domain'].".ca", 'w');
fwrite($fp, str_replace("\r\n", "\n", $_POST['v_ssl_ca']));
fwrite($fp, "\n");
fclose($fp);
}