mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
There could be multiple CA paths
This commit is contained in:
@@ -9107,13 +9107,15 @@ if ($ssl) {
|
||||
if ($certreqs && $certreqs->{'capath'}) {
|
||||
# Require that remote cert be signed by a valid CA
|
||||
$main::last_set_verify_err = undef;
|
||||
if (-d $certreqs->{'capath'}) {
|
||||
Net::SSLeay::CTX_load_verify_locations(
|
||||
$rv->{'ssl_ctx'}, "", $certreqs->{'capath'});
|
||||
}
|
||||
else {
|
||||
Net::SSLeay::CTX_load_verify_locations(
|
||||
$rv->{'ssl_ctx'}, $certreqs->{'capath'}, "");
|
||||
foreach my $capath (split(/\s+/, $certreqs->{'capath'})) {
|
||||
if (-d $capath) {
|
||||
Net::SSLeay::CTX_load_verify_locations(
|
||||
$rv->{'ssl_ctx'}, "", $capath);
|
||||
}
|
||||
else {
|
||||
Net::SSLeay::CTX_load_verify_locations(
|
||||
$rv->{'ssl_ctx'}, $capath, "");
|
||||
}
|
||||
}
|
||||
Net::SSLeay::CTX_set_verify(
|
||||
$rv->{'ssl_ctx'}, &Net::SSLeay::VERIFY_PEER,
|
||||
|
||||
Reference in New Issue
Block a user