summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2012-10-12 09:11:51 +0200
committerSybren A. Stüvel <sybren@stuvel.eu>2012-10-12 09:11:51 +0200
commit14ba108859bb118f425b0e35054f3add6f006be2 (patch)
tree34a9729a5d5d4f12a63b7c3df61e2e6c140e599d
parent9884505885e342de141d1f4a3cc0be8dcd0c54b3 (diff)
downloadrsa-git-14ba108859bb118f425b0e35054f3add6f006be2.tar.gz
Explicitly cast ASN.1 integer type to Python int
-rw-r--r--rsa/key.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rsa/key.py b/rsa/key.py
index 43f4c87..b6de7b3 100644
--- a/rsa/key.py
+++ b/rsa/key.py
@@ -158,7 +158,7 @@ class PublicKey(AbstractKey):
from rsa.asn1 import AsnPubKey
(priv, _) = decoder.decode(keyfile, asn1Spec=AsnPubKey())
- return cls(n=priv['modulus'], e=priv['publicExponent'])
+ return cls(n=int(priv['modulus']), e=int(priv['publicExponent']))
def _save_pkcs1_der(self):
'''Saves the public key in PKCS#1 DER format.