summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-27 03:56:09 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-27 03:56:09 +0000
commitbcf0499394694298bcb2e20f1462af93fda29c13 (patch)
tree1d9a4c199caad0e9bc0cd195672f4bc3e2cb75b7 /usr
parent199505464ee6174f43cea40705f4c66249a41edf (diff)
downloadpfsense-bcf0499394694298bcb2e20f1462af93fda29c13.zip
pfsense-bcf0499394694298bcb2e20f1462af93fda29c13.tar.gz
Mount rw before working with /etc
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/vpn_ipsec_ca_edit_create_cert.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/vpn_ipsec_ca_edit_create_cert.php b/usr/local/www/vpn_ipsec_ca_edit_create_cert.php
index b4914c2..88a374d 100755
--- a/usr/local/www/vpn_ipsec_ca_edit_create_cert.php
+++ b/usr/local/www/vpn_ipsec_ca_edit_create_cert.php
@@ -65,6 +65,7 @@ if ($_POST) {
$commonname=$_POST['commonname'];
/* Write out /etc/ssl/openssl.cnf */
+ config_mount_rw();
$fd = fopen("/etc/ssl/openssl.cnf", "w");
fwrite($fd, "");
fwrite($fd, "[ req ]\n");
@@ -139,6 +140,7 @@ if ($_POST) {
fwrite($fd, "[ crl_ext ]\n");
fwrite($fd, "authorityKeyIdentifier=keyid:always,issuer:always\n");
fclose($fd);
+ config_mount_ro();
?>
@@ -157,7 +159,7 @@ if ($_POST) {
<?php if ($savemsg) print_info_box($savemsg); ?>
<p>One moment please...
<?php
- config_mount_rw();
+
mwexec("cd /tmp/ && /usr/bin/openssl req -new -x509 -keyout cakey.pem -out cacert.pem -days 3650 -config /etc/ssl/openssl.cnf -passin pass:test -nodes");
//mwexec("cd /tmp/ && /usr/bin/openssl req -config openssl.cnf -new -nodes > cacert.pem ");
//mwexec("cd /tmp/ && /usr/bin/openssl x509 -in cert.csr -out cert.pem -req -signkey cakey.pem");
@@ -171,7 +173,7 @@ if ($_POST) {
$cakeyA = ereg_replace("\r","",$cakey);
$cacert = ereg_replace("\n","\\n",$cacert);
$cakey = ereg_replace("\n","\\n",$cakey);
- config_mount_ro();
+
?>
<script language="JavaScript">
<!--
OpenPOWER on IntegriCloud