diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2004-11-19 18:31:33 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2004-11-19 18:31:33 +0000 |
commit | 59e743dd5ddf8a8fca2cab8bc031daf2ddd64492 (patch) | |
tree | 9500201df8606d3d201662fd9b40f7f105fef96b | |
parent | e19a8890b772094fb2e15d5a38c277013d371476 (diff) | |
download | pfsense-59e743dd5ddf8a8fca2cab8bc031daf2ddd64492.zip pfsense-59e743dd5ddf8a8fca2cab8bc031daf2ddd64492.tar.gz |
fix certificate creation
-rwxr-xr-x | usr/local/www/system_advanced_create_certs.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/usr/local/www/system_advanced_create_certs.php b/usr/local/www/system_advanced_create_certs.php index 9254907..0c4b94d 100755 --- a/usr/local/www/system_advanced_create_certs.php +++ b/usr/local/www/system_advanced_create_certs.php @@ -99,16 +99,12 @@ if ($_POST) { <?php if ($savemsg) print_info_box($savemsg); ?> <p>One moment please... <?php - //openssl genrsa -des3 -out privkey.pem 2048 - //openssl req -new -x509 -nodes -key privkey.pem -out cacert.pem -days 100 - mwexec("cd /tmp && openssl genrsa -passout pass:test -des3 -out privkey.pem 1024 && cat /tmp/privkey.pem"); - mwexec("cd /tmp && openssl req -nodes -new > cert.csr"); - mwexec("cd /tmp && openssl rsa -in privkey.pem -out key.pem"); - mwexec("cd /tmp && openssl x509 -in cert.csr -out cert.pem -req -signkey key.pem -days 365"); - $fd = fopen("/tmp/cert.pem", "r"); + //mwexec("cd /tmp && openssl req -nodes -new > cert.csr && openssl rsa -in privkey.pem -out key.pem && openssl x509 -in cert.csr -out cert.pem -req -signkey key.pem -days 365"); + 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"); + $fd = fopen("/tmp/cacert.pem", "r"); $cacert = fread($fd,8096); fclose($fd); - $fd = fopen("/tmp/key.pem", "r"); + $fd = fopen("/tmp/cakey.pem", "r"); $cakey = fread($fd,8096); fclose($fd); $cacertA = ereg_replace("\r","",$cacert); @@ -122,7 +118,7 @@ if ($_POST) { var cakey='<?=$cakey?>'; opener.document.forms[0].cert.value=cacert; opener.document.forms[0].key.value=cakey; - //this.close(); + this.close(); --> </script> |