From 8d8f710720cd0d3cbf82ba4e1204949be1b1c1b0 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 24 Mar 2011 01:09:27 -0400 Subject: [PATCH] make sure fingerprints and validity get passed through to the marginal UI appropriately --- Crypt/Monkeysphere/MSVA.pm | 4 +--- Crypt/Monkeysphere/MSVA/MarginalUI.pm | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index 0b71816..6442fbb 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -683,11 +683,9 @@ $ret->{valid} = JSON::true; $ret->{message} = sprintf('Successfully validated "%s" through the OpenPGP Web of Trust.', $uid); } else { - my @subvalid_key_fprs= map { $_->{fingerprint} } @{$uid_query->{subvalid_keys}}; - my $resp = Crypt::Monkeysphere::MSVA::MarginalUI->ask_the_user($gnupg, $uid, - \@subvalid_key_fprs, + $uid_query->{subvalid_keys}, getpidswithsocketinode($clientinfo->{inode}), $logger); msvalog('info', "response: %s\n", $resp); diff --git a/Crypt/Monkeysphere/MSVA/MarginalUI.pm b/Crypt/Monkeysphere/MSVA/MarginalUI.pm index c386a98..4ccf048 100755 --- a/Crypt/Monkeysphere/MSVA/MarginalUI.pm +++ b/Crypt/Monkeysphere/MSVA/MarginalUI.pm @@ -46,7 +46,7 @@ } foreach my $keyfpr (@subvalid_key_fprs) { - my $fprx = sprintf('0x%.40s', $keyfpr->{fpr}->as_hex_string()); + my $fprx = sprintf('0x%.40s', $keyfpr->{fingerprint}->as_hex_string()); $logger->log('debug', "checking on %s\n", $fprx); foreach my $gpgkey ($gnupg->get_public_keys_with_sigs($fprx)) { $logger->log('debug', "found key %.40s\n", $gpgkey->fingerprint->as_hex_string); @@ -72,7 +72,7 @@ if ($cert->hex_id =~ /^([A-Fa-f0-9]{16})$/) { my $certid = $1; # disregard self-certifications (see MS # 2569): - if (lc($certid) eq lc(substr($keyfpr->{fpr}->as_hex_string(), -16))) { + if (lc($certid) eq lc(substr($keyfpr->{fingerprint}->as_hex_string(), -16))) { $logger->log('debug', "found self-sig 0x%.16s\n", $certid); next; } @@ -159,7 +159,7 @@ Would you like to temporarily accept this certificate for this peer?", Peer's OpenPGP key fingerprint: 0x%.40s GnuPG calculated validity for the peer: %s", $uid, - $keyfpr->{fpr}->as_hex_string, + $keyfpr->{fingerprint}->as_hex_string, $keyfpr->{val}, ); # FIXME: what about revoked certifications? -- 2.26.2