From: Jameson Rollins Date: Thu, 30 Dec 2010 17:47:05 +0000 (-0500) Subject: Allow for '0x' prefix to openpgp4fpr X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=523e8eb3680633d6929630764a1e28e69bacecf1;p=monkeysphere-validation-agent.git Allow for '0x' prefix to openpgp4fpr Modify the regexp check of the data to return everything after a '0x' instance as the fingerprint. --- diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm index c9a4cd6..e377808 100755 --- a/Crypt/Monkeysphere/MSVA.pm +++ b/Crypt/Monkeysphere/MSVA.pm @@ -711,8 +711,8 @@ my $key; my $gpgquery; if (lc($data->{pkc}->{type}) eq 'openpgp4fpr') { - if ($data->{pkc}->{data} =~ /^([[:xdigit:]]+)$/) { - $data->{pkc}->{data} = $1; + if ($data->{pkc}->{data} =~ /^(0x)?([[:xdigit:]]+)$/) { + $data->{pkc}->{data} = $2; $fpr = $data->{pkc}->{data}; msvalog('verbose', "OpenPGP v4 fingerprint: %s\n",$fpr); } else {