If a fingerprint could not be verified automatically or manually
raise an exception to ensure that we do not continue with handling
the problematic or even evil response.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
my ($self, $fingerprint) = @_;
if (!$self->{manual_verification}) {
- warn "fingerprint: $fingerprint\n";
- return 0;
+ raise("fingerprint '$fingerprint' not verified, abort!\n");
}
print "The authenticity of host '$self->{host}' can't be established.\n" .
$self->{cached_fingerprints}->{$fingerprint} = $valid;
+ raise("Fingerprint not verified, abort!\n") if !$valid;
+
if (my $cb = $self->{register_fingerprint_cb}) {
$cb->($fingerprint) if $valid;
}