mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix display of openssl errors when working with CA or certificate entries. Found this while looking into ticket #7370
This commit is contained in:
parent
8724b1add2
commit
5ce9bcf5ed
@ -274,9 +274,11 @@ if ($_POST['save']) {
|
||||
$dn['organizationalUnitName'] = $pconfig['dn_organizationalunit'];
|
||||
}
|
||||
if (!ca_create($ca, $pconfig['keylen'], $pconfig['lifetime'], $dn, $pconfig['digest_alg'])) {
|
||||
$input_errors = array();
|
||||
while ($ssl_err = openssl_error_string()) {
|
||||
$input_errors = array();
|
||||
array_push($input_errors, "openssl library returns: " . $ssl_err);
|
||||
if (strpos($ssl_err, 'NCONF_get_string:no value') === false) {
|
||||
array_push($input_errors, "openssl library returns: " . $ssl_err);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ($pconfig['method'] == "intermediate") {
|
||||
@ -291,9 +293,11 @@ if ($_POST['save']) {
|
||||
$dn['organizationalUnitName'] = $pconfig['dn_organizationalunit'];
|
||||
}
|
||||
if (!ca_inter_create($ca, $pconfig['keylen'], $pconfig['lifetime'], $dn, $pconfig['caref'], $pconfig['digest_alg'])) {
|
||||
$input_errors = array();
|
||||
while ($ssl_err = openssl_error_string()) {
|
||||
$input_errors = array();
|
||||
array_push($input_errors, "openssl library returns: " . $ssl_err);
|
||||
if (strpos($ssl_err, 'NCONF_get_string:no value') === false) {
|
||||
array_push($input_errors, "openssl library returns: " . $ssl_err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -308,9 +312,8 @@ if ($_POST['save']) {
|
||||
|
||||
if (!$input_errors) {
|
||||
write_config();
|
||||
pfSenseHeader("system_camanager.php");
|
||||
}
|
||||
|
||||
pfSenseHeader("system_camanager.php");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -398,9 +398,11 @@ if ($_POST['save']) {
|
||||
}
|
||||
|
||||
if (!cert_create($cert, $pconfig['caref'], $pconfig['keylen'], $pconfig['lifetime'], $dn, $pconfig['type'], $pconfig['digest_alg'])) {
|
||||
$input_errors = array();
|
||||
while ($ssl_err = openssl_error_string()) {
|
||||
$input_errors = array();
|
||||
array_push($input_errors, "openssl library returns: " . $ssl_err);
|
||||
if (strpos($ssl_err, 'NCONF_get_string:no value') === false) {
|
||||
array_push($input_errors, "openssl library returns: " . $ssl_err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -425,9 +427,11 @@ if ($_POST['save']) {
|
||||
}
|
||||
|
||||
if (!csr_generate($cert, $pconfig['csr_keylen'], $dn, $pconfig['csr_digest_alg'])) {
|
||||
$input_errors = array();
|
||||
while ($ssl_err = openssl_error_string()) {
|
||||
$input_errors = array();
|
||||
array_push($input_errors, "openssl library returns: " . $ssl_err);
|
||||
if (strpos($ssl_err, 'NCONF_get_string:no value') === false) {
|
||||
array_push($input_errors, "openssl library returns: " . $ssl_err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user