Project

General

Profile

« Previous | Next » 

Revision 26e58bb2

Added by Jim Pingle over 11 years ago

Fix issue with CSR generation. Ticket #2820

View differences:

usr/local/www/system_certmanager.php
296 296
				}else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"]))
297 297
					array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters.");
298 298
			}
299
			
300
			if (isset($_POST["keylen"]) && !in_array($_POST["keylen"], $cert_keylens))
299

  
300
			if (($pconfig['method'] != "external") && isset($_POST["keylen"]) && !in_array($_POST["keylen"], $cert_keylens))
301 301
				array_push($input_errors, gettext("Please select a valid Key Length."));
302
			if (!in_array($_POST["digest_alg"], $openssl_digest_algs))
302
			if (($pconfig['method'] != "external") && !in_array($_POST["digest_alg"], $openssl_digest_algs))
303 303
				array_push($input_errors, gettext("Please select a valid Digest Algorithm."));
304 304
				
305
			if (isset($_POST["csr_keylen"]) && !in_array($_POST["csr_keylen"], $cert_keylens))
305
			if (($pconfig['method'] == "external") && isset($_POST["csr_keylen"]) && !in_array($_POST["csr_keylen"], $cert_keylens))
306 306
				array_push($input_errors, gettext("Please select a valid Key Length."));
307
			if (!in_array($_POST["csr_digest_alg"], $openssl_digest_algs))
307
			if (($pconfig['method'] == "external") && !in_array($_POST["csr_digest_alg"], $openssl_digest_algs))
308 308
				array_push($input_errors, gettext("Please select a valid Digest Algorithm."));
309 309
		}
310 310

  

Also available in: Unified diff