Skip to content

Commit 766fd7d

Browse files
robbat2sitaramc
authored andcommitted
ukm: use new ssh fingerprint functions.
UKM was never updated for new-style fingerprints at all. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
1 parent 2be6b7f commit 766fd7d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • contrib/commands

contrib/commands/ukm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ sub cd_temp_clone {
220220

221221
# compute the fingerprint from the full path of a pubkey file
222222
sub fingerprint {
223-
my $fp = `ssh-keygen -l -f $_[0]`;
224-
die "does not seem to be a valid pubkey\n"
225-
unless $fp =~ /(([0-9a-f]+:)+[0-9a-f]+) /i;
226-
return $1;
223+
my ($fp, $output) = ssh_fingerprint_file(shift);
224+
# Do not print the output of $output to an untrusted destination.
225+
die "does not seem to be a valid pubkey\n" unless $fp;
226+
return $fp;
227227
}
228228

229229

0 commit comments

Comments
 (0)