fix protocols x509 certificate mode

This commit is contained in:
Colin Gagnaire 2019-01-03 15:47:39 +01:00
parent 48a89eb8b9
commit d4d7caf91a
1 changed files with 2 additions and 2 deletions

View File

@ -170,8 +170,8 @@ sub manage_selection {
$socket = IO::Socket::SSL->new(
PeerHost => $self->{option_results}->{hostname},
PeerPort => $self->{option_results}->{port},
$self->{option_results}->{servername} ? ( SSL_hostname => $self->{option_results}->{servername} ) : '',
$self->{option_results}->{timeout} ? ( Timeout => $self->{option_results}->{timeout} ) : '',
$self->{option_results}->{servername} ? ( SSL_hostname => $self->{option_results}->{servername} ) : (),
$self->{option_results}->{timeout} ? ( Timeout => $self->{option_results}->{timeout} ) : (),
);
};
if ($@) {