diff options
author | jim-p <jimp@pfsense.org> | 2014-02-18 14:16:01 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-02-18 14:16:01 -0500 |
commit | 26e58bb20544fec9afb5e17c497faf1621a10e63 (patch) | |
tree | 3690fcb016d8b5b54b2a91996651bafd90cf6179 /usr/local/www | |
parent | 8a4d1dbd2a4d536201363a0f8d8a42fb6e057b33 (diff) | |
download | pfsense-26e58bb20544fec9afb5e17c497faf1621a10e63.zip pfsense-26e58bb20544fec9afb5e17c497faf1621a10e63.tar.gz |
Fix issue with CSR generation. Ticket #2820
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/system_certmanager.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php index 04ddfc1..57d6864 100644 --- a/usr/local/www/system_certmanager.php +++ b/usr/local/www/system_certmanager.php @@ -296,15 +296,15 @@ if ($_POST) { }else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"])) array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters."); } - - if (isset($_POST["keylen"]) && !in_array($_POST["keylen"], $cert_keylens)) + + if (($pconfig['method'] != "external") && isset($_POST["keylen"]) && !in_array($_POST["keylen"], $cert_keylens)) array_push($input_errors, gettext("Please select a valid Key Length.")); - if (!in_array($_POST["digest_alg"], $openssl_digest_algs)) + if (($pconfig['method'] != "external") && !in_array($_POST["digest_alg"], $openssl_digest_algs)) array_push($input_errors, gettext("Please select a valid Digest Algorithm.")); - if (isset($_POST["csr_keylen"]) && !in_array($_POST["csr_keylen"], $cert_keylens)) + if (($pconfig['method'] == "external") && isset($_POST["csr_keylen"]) && !in_array($_POST["csr_keylen"], $cert_keylens)) array_push($input_errors, gettext("Please select a valid Key Length.")); - if (!in_array($_POST["csr_digest_alg"], $openssl_digest_algs)) + if (($pconfig['method'] == "external") && !in_array($_POST["csr_digest_alg"], $openssl_digest_algs)) array_push($input_errors, gettext("Please select a valid Digest Algorithm.")); } |