From e2e86b09f48ae9e3c115a7215256ac1345f86a5c Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 21 May 2009 13:06:18 -0400 Subject: properly match fingerprints with leading 0 bytes (https://labs.riseup.net/code/issues/show/831) --- src/share/keytrans | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/share') 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)) || -- cgit v1.2.3