216 |
<center><h2>Certificate Search</h2> |
<center><h2>Certificate Search</h2> |
217 |
<form action=<?=$PHP_SELF?> method=post name=search> |
<form action=<?=$PHP_SELF?> method=post name=search> |
218 |
<input type=text name=search value="<?=htvar($search)?>" maxlength=60 size=40> |
<input type=text name=search value="<?=htvar($search)?>" maxlength=60 size=40> |
|
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<br>'; |
|
|
|
|
|
+ $countrycode = strtoupper($country); |
|
|
+ |
|
|
+ if (! preg_match("/\b[A-Z][A-Z]\b/", $countrycode, $match) ) { |
|
|
+ $er .= 'Country Code must be ISO 3166 two letters <br>'; |
|
|
+ } |
|
|
|
|
|
if ( $passwd && strlen($passwd) < 8 ) |
|
|
$er .= 'Certificate password is too short.<br>'; |
|
|
@@ -762,9 +767,8 @@ |
|
|
<td><select name=expiry> |
|
|
|
|
|
<? |
|
|
- for ( $i = 5 ; $i < 20 ; $i+=5 ) { |
|
|
- print "<option value=$i " . ($expiry == $i ? "selected='selected |
|
|
-'" : "") . " >$i Years</option>\n" ; |
|
|
+ for ( $i = 5 ; $i <= 20 ; $i+=5 ) { |
|
|
+ print "<option value=$i " . ($expiry == $i ? "selected='selected'" : "") . " >$i Years</option>\n" ; |
|
|
} |
|
|
?> |
|
|
|
|
|
@@ -780,8 +784,7 @@ |
|
|
|
|
|
<? |
|
|
for ( $i = 512 ; $i <= 4096 ; $i+=512 ) { |
|
|
- print "<option value=$i " . ($keysize == $i ? "selected='selected |
|
|
-'" : "") . " >$i bits</option>\n" ; |
|
|
+ print "<option value=$i " . ($keysize == $i ? "selected='selected'" : "") . " >$i bits</option>\n" ; |
|
|
} |
|
|
?> |
|
219 |
|
|
220 |
diff -ruN phpki.old/phpki-0.82/setup.php-presetup phpki/phpki-0.82/setup.php-presetup |
diff -ruN phpki.old/phpki-0.82/setup.php-presetup phpki/phpki-0.82/setup.php-presetup |
221 |
--- phpki.old/phpki-0.82/setup.php-presetup 2018-11-17 14:06:06.548603290 +0100 |
--- phpki.old/phpki-0.82/setup.php-presetup 2018-11-17 14:06:06.548603290 +0100 |