summaryrefslogtreecommitdiff
path: root/src/share/keytrans
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-05-21 13:06:18 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-05-21 13:06:18 -0400
commite2e86b09f48ae9e3c115a7215256ac1345f86a5c (patch)
treee005bbee23c9f224dc7efa31dcc7c82a4ff9bbb0 /src/share/keytrans
parentdc89c4d16b754408f5e24067073ead1e9e231c48 (diff)
properly match fingerprints with leading 0 bytes (https://labs.riseup.net/code/issues/show/831)
Diffstat (limited to 'src/share/keytrans')
-rwxr-xr-xsrc/share/keytrans2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/share/keytrans b/src/share/keytrans
index 516f2da..c47ccdc 100755
--- a/src/share/keytrans
+++ b/src/share/keytrans
@@ -690,6 +690,8 @@ sub openpgp2ssh {
my $foundfpr = fingerprint($pubkey, $timestamp);
my $foundfprstr = Crypt::OpenSSL::Bignum->new_from_bin($foundfpr)->to_hex();
+ # left-pad with 0's to bring up to full 40-char (160-bit) fingerprint:
+ $foundfprstr = sprintf("%040s", $foundfprstr);
# is this a match?
if ((!defined($fpr)) ||