Skip to content

Commit

Permalink
Add ssl_strict option missing in old versions of libwww in check_rabb…
Browse files Browse the repository at this point in the history
…itmq_cluster
  • Loading branch information
barryib committed Apr 10, 2016
1 parent a80fa5d commit 2b0c1fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/check_rabbitmq_cluster
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ $p->add_arg(spec => 'ssl|ssl!',
default => 0
);

$p->add_arg(spec => 'ssl_strict|ssl_strict!',
help => "Verify SSL certificate (default: true)",
default => 1
);

$p->add_arg(spec => 'proxy|proxy!',
help => "Use environment proxy (default: true)",
default => 1
Expand Down Expand Up @@ -102,7 +107,9 @@ elsif($p->opts->proxy == 1 )
}
$ua->agent($PROGNAME.' ');
$ua->timeout($p->opts->timeout);

if ($p->opts->ssl and $ua->can('ssl_opts')) {
$ua->ssl_opts(verify_hostname => $p->opts->ssl_strict);
}
my $req = HTTP::Request->new(GET => $url);
$req->authorization_basic($p->opts->username, $p->opts->password);
my $res = $ua->request($req);
Expand Down

0 comments on commit 2b0c1fb

Please sign in to comment.