diff options
author | Sybren A. St?vel <sybren@stuvel.eu> | 2012-10-12 09:11:51 +0200 |
---|---|---|
committer | Sybren A. St?vel <sybren@stuvel.eu> | 2012-10-12 09:11:51 +0200 |
commit | d8d6d933f67d3967fbbb4d87a34da52166d8bf41 (patch) | |
tree | 34a9729a5d5d4f12a63b7c3df61e2e6c140e599d /rsa | |
parent | 093fba63f93b0fe4560b5e2d325aa629b21f7d45 (diff) | |
download | rsa-d8d6d933f67d3967fbbb4d87a34da52166d8bf41.tar.gz |
Explicitly cast ASN.1 integer type to Python int
Diffstat (limited to 'rsa')
-rw-r--r-- | rsa/key.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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. |