summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-02-18 14:16:01 -0500
committerjim-p <jimp@pfsense.org>2014-02-18 14:16:01 -0500
commit26e58bb20544fec9afb5e17c497faf1621a10e63 (patch)
tree3690fcb016d8b5b54b2a91996651bafd90cf6179 /usr
parent8a4d1dbd2a4d536201363a0f8d8a42fb6e057b33 (diff)
downloadpfsense-26e58bb20544fec9afb5e17c497faf1621a10e63.zip
pfsense-26e58bb20544fec9afb5e17c497faf1621a10e63.tar.gz
Fix issue with CSR generation. Ticket #2820
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/system_certmanager.php10
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."));
}
OpenPOWER on IntegriCloud