aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-01-12 23:43:23 -0800
committerSitaram Chamarty <sitaram@atc.tcs.com>2016-01-19 20:31:27 +0530
commit2be6b7fdc3e0f028f36f2b01e7cb7baff9d275e3 (patch)
treee39fe449204285e516cd573ca8e4f9380ff52ac1 /src
parentsshkeys-lint: use new ssh fingerprint functions. (diff)
downloadgitolite-gentoo-2be6b7fdc3e0f028f36f2b01e7cb7baff9d275e3.tar.gz
gitolite-gentoo-2be6b7fdc3e0f028f36f2b01e7cb7baff9d275e3.tar.bz2
gitolite-gentoo-2be6b7fdc3e0f028f36f2b01e7cb7baff9d275e3.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>
Diffstat (limited to 'src')
-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 {