summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_certmanager.php
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:48 -0500
commit738fab3dd664e637969bf4f0ad92ace367a343d5 (patch)
tree2d0dba3ea24e729d078c28409114967bf0132189 /usr/local/www/system_certmanager.php
parenta60c6356ee22b081bdfe6b8a8dfd83865e6f2681 (diff)
downloadpfsense-738fab3dd664e637969bf4f0ad92ace367a343d5.zip
pfsense-738fab3dd664e637969bf4f0ad92ace367a343d5.tar.gz
Fix issue with CSR generation. Ticket #2820
Diffstat (limited to 'usr/local/www/system_certmanager.php')
-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 1add2fc..0dc3f6c 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -302,15 +302,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