diff -ruN phpki.old/phpki-0.82/admin/index.php phpki/phpki-0.82/admin/index.php --- phpki.old/phpki-0.82/admin/index.php 2005-11-15 18:14:23.000000000 +0100 +++ phpki/phpki-0.82/admin/index.php 2020-03-03 14:21:55.635891053 +0100 @@ -28,7 +28,7 @@ case 'add_user_form'; printHeader('admin'); ?> - +
method=post name=form> @@ -76,7 +76,7 @@ case 'del_user_form'; printHeader('admin'); ?> - + method=post name=form>

Add User or Change Password

diff -ruN phpki.old/phpki-0.82/ca/manage_certs.php phpki/phpki-0.82/ca/manage_certs.php --- phpki.old/phpki-0.82/ca/manage_certs.php 2018-11-17 14:06:06.550603387 +0100 +++ phpki/phpki-0.82/ca/manage_certs.php 2020-03-03 14:20:50.174722154 +0100 @@ -89,16 +89,16 @@ upload("$config[pfx_dir]/$serial.pfx", "$rec[common_name].p12", 'application/x-pkcs12'); break; case 'PEMCERT': - upload("$config[new_certs_dir]/$serial.pem", "$rec[common_name].pem",'application/pkix-cert'); + upload("$config[new_certs_dir]/$serial.pem", "$rec[common_name]-cert.pem",'application/pkix-cert'); break; case 'PEMKEY': upload("$config[private_dir]/$serial-key.pem", "$rec[common_name]-key.pem",'application/octet-stream'); break; case 'PEMBUNDLE': - upload(array("$config[private_dir]/$serial-key.pem","$config[new_certs_dir]/$serial.pem"), "$rec[common_name].pem",'application/octet-stream'); + upload(array("$config[private_dir]/$serial-key.pem","$config[new_certs_dir]/$serial.pem"), "$rec[common_name]-bundle.pem",'application/octet-stream'); break; case 'PEMCABUNDLE': - upload(array("$config[private_dir]/$serial-key.pem","$config[new_certs_dir]/$serial.pem",$config['cacert_pem']), "$rec[common_name].pem",'application/octet-stream'); + upload(array("$config[private_dir]/$serial-key.pem","$config[new_certs_dir]/$serial.pem",$config['cacert_pem']), "$rec[common_name]-bundle-root.pem",'application/octet-stream'); break; default: header("Location: ${PHP_SELF}?$qstr_sort&$qstr_filter"); @@ -123,6 +123,7 @@ Locality
State/Province
Country
+

Remove User

Are you sure?

-

+   @@ -198,7 +199,7 @@ printHeader('ca'); ?> - + @@ -249,7 +250,7 @@ print "\n" ; print "\n" ; print "\n" ; - for ( $i = 2 ; $i < 6 ; $i++ ) { + for ( $i = 2 ; $i <= 5 ; $i++ ) { print "\n" ; } @@ -285,8 +286,7 @@ print ""; ?> -

There was an error creating your certificate -.


+

There was an error creating your certificate.


Debug Info:

@@ -308,14 +308,13 @@ printHeader('ca'); ?> - +
CERTIFICATE MANAGEMENT CONTROL PANEL
" method=get name=filter> Search: -       >Valid +       >Valid   >Revoked   >Expired       diff -ruN phpki.old/phpki-0.82/ca/request_cert.php phpki/phpki-0.82/ca/request_cert.php --- phpki.old/phpki-0.82/ca/request_cert.php 2018-11-17 14:06:06.538602802 +0100 +++ phpki/phpki-0.82/ca/request_cert.php 2020-03-03 14:19:28.624775077 +0100 @@ -216,7 +216,7 @@ printHeader(); ?> - + @@ -266,7 +266,7 @@ print "\n" ; print "\n" ; print "\n" ; - for ( $i = 2 ; $i < 6 ; $i++ ) { + for ( $i = 2 ; $i <= 5 ; $i++ ) { print "\n" ; } @@ -279,7 +279,7 @@

Certificate Request Form

Key Size diff -ruN phpki.old/phpki-0.82/setup.php phpki/phpki-0.82/setup.php --- phpki.old/phpki-0.82/setup.php 2018-11-17 14:06:06.548603290 +0100 +++ phpki/phpki-0.82/setup.php 2020-03-03 15:44:01.215746367 +0100 @@ -102,6 +102,11 @@ if (! $passwd_file) $er .= 'Missing User Password File Location'; if (! $store_dir) $er .= 'Missing Storage Directory
'; + $countrycode = strtoupper($country); + + if (! preg_match("/\b[A-Z][A-Z]\b/", $countrycode, $match) ) { + $er .= 'Country Code must be ISO 3166 two letters
'; + } if ( $passwd && strlen($passwd) < 8 ) $er .= 'Certificate password is too short.
'; @@ -762,9 +767,8 @@