[Pkg-privacy-commits] [msva-perl] 275/356: return pkcextractkey before processing key exponent/modulus if an error was encountered
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:42:04 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 b1defd42b9fbd7552478cf30a1ea4e7dea477cf6
Author: Jameson Rollins <jrollins at finestructure.net>
Date: Thu Dec 30 12:35:08 2010 -0500
return pkcextractkey before processing key exponent/modulus if an error was encountered
This should prevent some unnecessary processing on errors.
---
Crypt/Monkeysphere/MSVA.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm
index 38162e0..c9a4cd6 100755
--- a/Crypt/Monkeysphere/MSVA.pm
+++ b/Crypt/Monkeysphere/MSVA.pm
@@ -493,6 +493,10 @@
$key->{error} = sprintf("Don't know this public key carrier type: %s", $data->{pkc}->{type});
}
+ if (exists $key->{error}) {
+ return $key;
+ }
+
# make sure that the returned integers are Math::BigInts:
$key->{exponent} = Math::BigInt::->new($key->{exponent}) unless (ref($key->{exponent}));
$key->{modulus} = Math::BigInt::->new($key->{modulus}) unless (ref($key->{modulus}));
@@ -504,6 +508,7 @@
if ($key->{modulus}->copy()->blog(2) < 1000) {
$key->{error} = sprintf('Public key size is less than 1000 bits (was: %d bits)', $key->{modulus}->copy()->blog(2));
}
+
return $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