[Pkg-privacy-commits] [msva-perl] 302/356: use new upstream features of Crypt::X509 directly -- less code in MSVA

Ximin Luo infinity0 at moszumanska.debian.org
Mon Aug 24 07:42:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository msva-perl.

commit 89339031f4ea68fdbf4493b279568e50791c7c81
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Mar 11 01:25:38 2011 -0500

    use new upstream features of Crypt::X509 directly -- less code in MSVA
---
 Changelog                  |  5 ++++-
 Crypt/Monkeysphere/MSVA.pm | 14 ++------------
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/Changelog b/Changelog
index bd09040..5eef10a 100644
--- a/Changelog
+++ b/Changelog
@@ -12,7 +12,10 @@ msva-perl (0.9~pre) upstream;
    - new Crypt::Monkeysphere::Validator
    - unit tests and unit test harness
 
- -- Daniel Kahn Gillmor <dkg at fifthhorseman.net>  Thu, 10 Mar 2011 00:58:11 -0500
+  [ Daniel Kahn Gillmor ]
+  * now depending on Crypt::X509 0.50 for pubkey components directly.
+
+ -- Daniel Kahn Gillmor <dkg at fifthhorseman.net>  Fri, 11 Mar 2011 01:24:55 -0500
 
 msva-perl (0.8) upstream;
 
diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm
index 9436671..e192fe2 100755
--- a/Crypt/Monkeysphere/MSVA.pm
+++ b/Crypt/Monkeysphere/MSVA.pm
@@ -25,9 +25,8 @@
 
   use Crypt::Monkeysphere::Validator;
 
-  require Crypt::X509;
+  use Crypt::X509 0.50;
   use Regexp::Common qw /net/;
-  use Convert::ASN1;
   use MIME::Base64;
   use IO::Socket;
   use IO::File;
@@ -70,15 +69,6 @@
     return $logger;
   }
 
-  my $rsa_decoder = Convert::ASN1::->new();
-  $rsa_decoder->prepare(q<
-
-   SEQUENCE {
-        modulus INTEGER,
-        exponent INTEGER
-   }
-          >);
-
   sub net_server {
     return 'Net::Server::MSVA';
   };
@@ -448,7 +438,7 @@
                                 $cert->PubKeyAlg(), $cert->pubkey_algorithm);
       } else {
         msvalog('debug', "decoding ASN.1 pubkey\n");
-        $key = $rsa_decoder->decode($cert->pubkey());
+        $key = $cert->pubkey_components();
         if (! defined $key) {
           msvalog('verbose', "failed to decode %s\n", unpack('H*', $cert->pubkey()));
           $key = {error => 'failed to decode the public key'};

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git



More information about the Pkg-privacy-commits mailing list