add missing if

This commit is contained in:
Fabian Grünbichler 2017-12-12 11:02:48 +01:00
parent 1d40f3c38c
commit 38eb3479f8

View File

@ -259,7 +259,7 @@ my $verify_cert_callback = sub {
# check server certificate against cache of pinned FPs
# get fingerprint of server certificate
my $fp = Net::SSLeay::X509_get_fingerprint($cert, 'sha256');
return 0 !defined($fp) || $fp eq ''; # error
return 0 if !defined($fp) || $fp eq ''; # error
my $valid = $self->{cached_fingerprints}->{$fp};
return $valid if defined($valid); # return cached result