From 738fab3dd664e637969bf4f0ad92ace367a343d5 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 18 Feb 2014 14:16:01 -0500 Subject: Fix issue with CSR generation. Ticket #2820 --- usr/local/www/system_certmanager.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr') 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.")); } -- cgit v1.1