From 2be6b7fdc3e0f028f36f2b01e7cb7baff9d275e3 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 12 Jan 2016 23:43:23 -0800 Subject: sskm: use new ssh fingerprint functions. SSKM was never updated for new-style fingerprints at all. Signed-off-by: Robin H. Johnson --- src/commands/sskm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/commands/sskm b/src/commands/sskm index fd60233..eb51f69 100755 --- a/src/commands/sskm +++ b/src/commands/sskm @@ -137,9 +137,10 @@ sub cd_temp_clone { } sub fingerprint { - my $fp = `ssh-keygen -l -f $_[0]`; - die "does not seem to be a valid pubkey\n" unless $fp =~ /(([0-9a-f]+:)+[0-9a-f]+ )/i; - return $1; + my ($fp, $output) = ssh_fingerprint_file(shift); + # Do not print the output of $output to an untrusted destination. + die "does not seem to be a valid pubkey\n" unless $fp; + return $fp; } sub safe_stdin { -- cgit v1.2.3-65-gdbad