Make default sha a configurabloe option and set to 512
This commit is contained in:
@@ -62,7 +62,7 @@ crl_extentions = crl_ext
|
||||
default_days = 365
|
||||
default_crl_days = 30
|
||||
preserve = no
|
||||
default_md = sha256
|
||||
default_md = $config[default_md]
|
||||
|
||||
[ req ]
|
||||
default_bits = $keysize
|
||||
|
@@ -201,7 +201,7 @@ case 'write':
|
||||
print '<strong>Writing configuration files...</strong><br>';
|
||||
flush();
|
||||
|
||||
$config_txt = <<<EOS
|
||||
$config_main_txt = <<<EOS
|
||||
<?php
|
||||
# PHPki CONFIGURATION FILE
|
||||
# Automatically generated by PHPki. Edit at your own peril.
|
||||
@@ -284,6 +284,9 @@ case 'write':
|
||||
# Default OpenSSL Config File.
|
||||
\$config['openssl_cnf'] = \$config['home_dir'] . '/config/openssl.cnf';
|
||||
|
||||
# Define default md
|
||||
\$config['default_md'] = 'sha512';
|
||||
|
||||
\$PHPki_admins = Array(md5('pkiadmin'));
|
||||
|
||||
define('OPENSSL',\$config['openssl_bin'].' ');
|
||||
@@ -301,14 +304,14 @@ EOS;
|
||||
# Write out the CA configuration file.
|
||||
#
|
||||
$fd = fopen("$store_dir/config/config.php",'w');
|
||||
fwrite($fd, $config_txt);
|
||||
fwrite($fd, $config_main_txt);
|
||||
fclose($fd);
|
||||
|
||||
|
||||
#
|
||||
# Create the bootstrap configuration
|
||||
#
|
||||
$config_txt = <<<EOS
|
||||
$config_boot_txt = <<<EOS
|
||||
<?php
|
||||
define('PHPKI_VERSION','$version');
|
||||
define('STORE_DIR','$store_dir');
|
||||
@@ -321,7 +324,7 @@ EOS;
|
||||
# Write out the bootstrap config
|
||||
#
|
||||
$fd = fopen('./config.php','w');
|
||||
fwrite($fd, $config_txt);
|
||||
fwrite($fd, $config_boot_txt);
|
||||
fclose($fd);
|
||||
|
||||
|
||||
@@ -351,7 +354,7 @@ crl_extensions = crl_ext
|
||||
default_days = 365
|
||||
default_crl_days= 30
|
||||
preserve = no
|
||||
default_md = sha256
|
||||
default_md = $config[default_md]
|
||||
|
||||
[ ca ]
|
||||
default_ca = email_cert
|
||||
|
Reference in New Issue
Block a user