Commits

Sybren Stüvel committed 89187b8

Explicitly cast ASN.1 integer type to Python int

  • Participants
  • Parent commits c07a41e

Comments (0)

Files changed (1)

         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.