From 52d44ba993cdba62d05a2051c0e26744586b6811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Thu, 23 Mar 2023 19:13:08 +0000 Subject: [PATCH] chore: remove Debian openssh-blacklist logic All Debian versions supporting this are EOL by now. --- lib/perl/OVH/Bastion/ssh.inc | 20 -------------------- tests/functional/launch_tests_on_instance.sh | 3 +-- tests/functional/tests.d/330-selfkeys.sh | 12 ------------ 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/lib/perl/OVH/Bastion/ssh.inc b/lib/perl/OVH/Bastion/ssh.inc index 759bc71..f99f676 100644 --- a/lib/perl/OVH/Bastion/ssh.inc +++ b/lib/perl/OVH/Bastion/ssh.inc @@ -365,26 +365,6 @@ sub get_ssh_pub_key_info { $return{'size'} = $size + 0; $return{'fingerprint'} = $fingerprint; $return{'family'} = $family; - my @blacklistfiles = qw{ DSA-1024 DSA-2048 RSA-1024 RSA-2048 RSA-4096 }; - if (grep { "$family-$size" eq $_ } @blacklistfiles) { - - # check for vulnkeys - my $blfile = '/usr/share/ssh/blacklist.' . $family . '-' . $size; - if (-r $blfile && open(my $fh_blacklist, '<', $blfile)) { - my $shortfp = $fingerprint; - $shortfp =~ s/://g; - $shortfp =~ s/^.{12}//; - - #print "looking for shortfingerprint=$shortfp...\n"; - local $_ = undef; - while (<$fh_blacklist>) { - /^\Q$shortfp\E$/ or next; - close($fh_blacklist); - return R('KO_VULNERABLE_KEY', value => \%return); - } - close($fh_blacklist); - } - } # check allowed algos and key size my $allowedSshAlgorithms = OVH::Bastion::config("allowed${way}SshAlgorithms"); diff --git a/tests/functional/launch_tests_on_instance.sh b/tests/functional/launch_tests_on_instance.sh index 4f36572..aed0515 100755 --- a/tests/functional/launch_tests_on_instance.sh +++ b/tests/functional/launch_tests_on_instance.sh @@ -15,7 +15,7 @@ opt_skip_consistency_check=0 opt_no_pause_on_fail=0 opt_log_prefix= opt_module= -declare -A capabilities=( [ed25519]=1 [blacklist]=0 [mfa]=1 [mfa-password]=0 [pamtester]=1 [piv]=1 ) +declare -A capabilities=( [ed25519]=1 [mfa]=1 [mfa-password]=0 [pamtester]=1 [piv]=1 ) # set the helptext now to get the proper default values help_text=$(cat <