Skip to content

Commit

Permalink
Merge pull request #333 from mcnewton/sslverify
Browse files Browse the repository at this point in the history
Disable HTTPS SSL certificate hostname checking, tidy debug output
  • Loading branch information
dmuhamedagic committed Oct 15, 2013
2 parents 4abfaf6 + 68fad38 commit b4bb744
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ldirectord/ldirectord.in
Expand Up @@ -2835,7 +2835,7 @@ sub check_http
&ld_debug(2, "check_http: url=\"$$r{url}\" "
. "virtualhost=\"$virtualhost\"");

my $ua = new LWP::UserAgent();
my $ua = new LWP::UserAgent(ssl_opts => { verify_hostname => 0 });

my $h = undef;
if ($$v{service} eq "http_proxy") {
Expand Down Expand Up @@ -2876,14 +2876,16 @@ sub check_http
}

if ($$v{service} eq "https") {
&ld_debug(2, "SSL-Cipher: " .
$res->header('Client-SSL-Cipher'));
&ld_debug(2, "SSL-Cert-Subject: " .
$res->header('Client-SSL-Cert-Subject'));
&ld_debug(2, "SSL-Cert-Issuer: " .
$res->header('Client-SSL-Cert-Issuer'));
&ld_debug(2, "SSL-Cipher: " .
($res->header('Client-SSL-Cipher') || '<not set>'));
&ld_debug(2, "SSL-Cert-Subject: " .
($res->header('Client-SSL-Cert-Subject') || '<not set>'));
&ld_debug(2, "SSL-Cert-Issuer: " .
($res->header('Client-SSL-Cert-Issuer') || '<not set>'));
}

&ld_debug(2, "Return status: " . $res->status_line);

my $recstr = $$r{receive};
if ($res->is_success && (!($recstr =~ /.+/) ||
$res->content =~ /$recstr/)) {
Expand Down

0 comments on commit b4bb744

Please sign in to comment.