Allow for '0x' prefix to openpgp4fpr
authorJameson Rollins <jrollins@finestructure.net>
Thu, 30 Dec 2010 17:47:05 +0000 (12:47 -0500)
committerJameson Rollins <jrollins@finestructure.net>
Thu, 30 Dec 2010 17:47:05 +0000 (12:47 -0500)
Modify the regexp check of the data to return everything after a
'0x' instance as the fingerprint.

Crypt/Monkeysphere/MSVA.pm

index c9a4cd66171cca83f962159393bfc41c7a226072..e377808c2c6cc6ead71f26d6e15180a111d332fc 100755 (executable)
     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 {