diff options
author | jake <jake@jakes-mail.top> | 2022-08-26 07:59:08 -0400 |
---|---|---|
committer | jake <jake@jakes-mail.top> | 2022-08-26 07:59:08 -0400 |
commit | 7ec99c4900b7fd6117fc20e70c76eba4c8032f6f (patch) | |
tree | 13eff828cb5bdb7b58e8c98a8c956c942fa5b8e0 /gmi.pl | |
parent | 600c62d79451dba30e21dbe35358da8dd89e2c8f (diff) |
Fix certificate setting errorously emiting an error when client did not present certificate
Fix in redirection setting again
Diffstat (limited to 'gmi.pl')
-rwxr-xr-x | gmi.pl | 36 |
1 files changed, 21 insertions, 15 deletions
@@ -7,7 +7,7 @@ use warnings; use 5.010; #use diagnostics; -our $VERSION = 'v0.17.1'; +our $VERSION = 'v0.17.2'; # Modules use IO::Socket::SSL; # CPAN @@ -1092,18 +1092,19 @@ sub redirection_parameter { $vhost = 'default'; } - ## no critic (cascading) - if ($r eq 'no') { - return 0; - } - elsif ($r eq 'simple') { - return 1; - } - elsif ($r eq 'regex') { - return 2; - } - elsif ($r) { - serr("'$vhost': Given redirection parameter is invalid: $r"); + if ($r) { + if ($r eq 'no') { + return 0; + } + elsif ($r eq 'simple') { + return 1; + } + elsif ($r eq 'regex') { + return 2; + } + else { + serr("'$vhost': Given redirection parameter is invalid: $r"); + } } return; @@ -1200,8 +1201,13 @@ sub cert_req { } } # must be string, hopefully 'any' - elsif ($cert_req->{$key} eq 'any' and defined $cl_cert) { - return 0; + elsif ($cert_req->{$key} eq 'any') { + if (defined $cl_cert) { + return 0; + } + else { + return 1; + } } else { serr("'$vhost': certs: when not an array, it must be 'any'."); |