aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-01-12 23:31:33 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2016-01-12 23:33:33 -0800
commit2982ffbeda19df88041eb382e51d55629dae1ce4 (patch)
treea973f6e649ee219372f768898a8e0cc0307fab31
parentsshkeys-lint: use new ssh fingerprint functions. (diff)
downloadgitolite-gentoo-2982ffbeda19df88041eb382e51d55629dae1ce4.tar.gz
gitolite-gentoo-2982ffbeda19df88041eb382e51d55629dae1ce4.tar.bz2
gitolite-gentoo-2982ffbeda19df88041eb382e51d55629dae1ce4.zip
sskm: use new ssh fingerprint functions.
SSKM was never updated for new-style fingerprints at all. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xsrc/commands/sskm7
1 files changed, 4 insertions, 3 deletions
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 {