summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-12-20 22:09:14 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-12-20 22:09:14 +0000
commit9a706a57ba6888eea230c79064c099c4c59b514d (patch)
tree14cb6081a6909e77c901e4bd3e4bb03ca4a5291b /usr
parentd92375afa54a130b6122859db98e84bb3d29486a (diff)
downloadpfsense-9a706a57ba6888eea230c79064c099c4c59b514d.zip
pfsense-9a706a57ba6888eea230c79064c099c4c59b514d.tar.gz
* Use file_get_contents()
* Use str_replace() * Use correct variables
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system_advanced_create_certs.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/usr/local/www/system_advanced_create_certs.php b/usr/local/www/system_advanced_create_certs.php
index 9b79456..c4bc7dd 100755
--- a/usr/local/www/system_advanced_create_certs.php
+++ b/usr/local/www/system_advanced_create_certs.php
@@ -154,16 +154,12 @@ include("head.inc");
<p>One moment please...
<?php
mwexec("cd /tmp/ && /usr/bin/openssl req -new -x509 -keyout /tmp/cakey.pem -out /tmp/cacert.pem -days 3650 -config /var/etc/ssl/openssl.cnf -passin pass:test -nodes");
- $fd = fopen("/tmp/cacert.pem", "r");
- $cacert = fread($fd,8096);
- fclose($fd);
- $fd = fopen("/tmp/cakey.pem", "r");
- $cakey = fread($fd,8096);
- fclose($fd);
- $cacertA = ereg_replace("\r","",$cacert);
- $cakeyA = ereg_replace("\r","",$cakey);
- $cacert = ereg_replace("\n","\\n",$cacert);
- $cakey = ereg_replace("\n","\\n",$cakey);
+ $cacert1 = file_get_contents("/tmp/cacert.pem");
+ $cakey1 = file_get_contents("/tmp/cakey.pem");
+ $cacertA = str_replace("\r","",$cacert1);
+ $cakeyA = str_replace("\r","",$cakey1);
+ $cacert = str_replace("\n","\\n",$cacertA);
+ $cakey = str_replace("\n","\\n",$cakeyA);
?>
<script language="JavaScript">
<!--
OpenPOWER on IntegriCloud