summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_advanced_create_certs.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/system_advanced_create_certs.php')
-rwxr-xr-xusr/local/www/system_advanced_create_certs.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/system_advanced_create_certs.php b/usr/local/www/system_advanced_create_certs.php
index 6ec1151..5d45aeb 100755
--- a/usr/local/www/system_advanced_create_certs.php
+++ b/usr/local/www/system_advanced_create_certs.php
@@ -35,6 +35,8 @@ $fd = fopen("/etc/ssl/openssl.cnf", "r");
$openssl = fread($fd,8096);
fclose($fd);
+/* Lets match the fileds in the read in file and
+ populate the variables for the form */
preg_match('/\nC\=(.*)\n/', $openssl, $countrycodeA);
preg_match('/\nST\=(.*)\n/', $openssl, $stateorprovinceA);
preg_match('/\nL\=(.*)\n/', $openssl, $citynameA);
@@ -51,7 +53,7 @@ $commonname = $commonnameA[1];
if ($_POST) {
- /* Create a new openssl.cnf */
+ /* Grab posted variables and create a new openssl.cnf */
$countrycode=$_POST['countrycode'];
$stateorprovince=$_POST['stateorprovince'];
$cityname=$_POST['cityname'];
@@ -59,6 +61,7 @@ if ($_POST) {
$orginizationdepartment=$_POST['orginizationdepartment'];
$commonname=$_POST['commonname'];
+ /* Write out /etc/ssl/openssl.cnf */
$fd = fopen("/etc/ssl/openssl.cnf", "w");
fwrite($fd, "");
fwrite($fd, "[ req ]\n");
OpenPOWER on IntegriCloud