projects
/
monkeysphere.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4665f85
)
fix stupid think-o that caused keytrans adduserid to misbehave if another key came...
author
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Mon, 18 Jan 2010 06:33:11 +0000
(
01:33
-0500)
committer
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Mon, 18 Jan 2010 06:33:11 +0000
(
01:33
-0500)
src/share/keytrans
patch
|
blob
|
history
diff --git
a/src/share/keytrans
b/src/share/keytrans
index 0f2ba41ca70fd0bb6ea0074e2e720b5a4b9c7cb5..255a271c2cefd7f2dd446d5b69e9a275f8116ce5 100755
(executable)
--- a/
src/share/keytrans
+++ b/
src/share/keytrans
@@
-722,6
+722,7
@@
sub findkey {
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);
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);
+ my $matched = 0;
# is this a match?
if ((!defined($data->{target}->{fpr})) ||
# is this a match?
if ((!defined($data->{target}->{fpr})) ||
@@
-731,6
+732,7
@@
sub findkey {
}
$data->{key} = { 'rsa' => $pubkey,
'timestamp' => $key_timestamp };
}
$data->{key} = { 'rsa' => $pubkey,
'timestamp' => $key_timestamp };
+ $matched = 1;
}
if ($tag != $packet_types->{seckey} &&
}
if ($tag != $packet_types->{seckey} &&
@@
-740,7
+742,7
@@
sub findkey {
}
return;
}
}
return;
}
- if (!
defined($data->{key})
) {
+ if (!
$matched
) {
# we don't think the public part of this key matches
if ($readbytes < $packetlen) {
read($instr, $dummy, $packetlen - $readbytes) or die "Could not skip past this packet.\n";
# we don't think the public part of this key matches
if ($readbytes < $packetlen) {
read($instr, $dummy, $packetlen - $readbytes) or die "Could not skip past this packet.\n";