Permalink
Browse files

common: fix TLS options settings.

The returned value by CTX_set_options is not an error, but the current
set of options; use the correct error checking functions to fix it.

This solves Debian bug #675377 and makes the TLS test pass correctly.

Closes: D#675377
  • Loading branch information...
1 parent 3613421 commit c1121391725aff2baf282041730ae75a7666e012 @Flameeyes Flameeyes committed with steveschnepp Nov 11, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 common/lib/Munin/Common/TLS.pm
@@ -132,8 +132,9 @@ sub _creat_tls_context {
}
# Tune a few things...
- if (Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL)) {
- $self->{logger}("[ERROR] Could not set SSL_CTX options");
+ Net::SSLeay::CTX_set_options($ctx, Net::SSLeay::OP_ALL());
+ if (my $errno = Net::SSLeay::ERR_get_error()) {
+ $self->{logger}("[ERROR] Could not set SSL_CTX options: " + Net::SSLeay::ERR_error_string($errno));
return 0;
}

0 comments on commit c112139

Please sign in to comment.