summaryrefslogtreecommitdiff
path: root/lib/Crypto/PublicKey
diff options
context:
space:
mode:
authorFrank Sievertsen <packaging@fx5.de>2012-11-19 08:21:21 +0100
committerDwayne Litzenberger <dlitz@dlitz.net>2013-02-16 11:14:09 -0800
commitdb52ac71e804e85ace3edd772d2e78055972ac2c (patch)
treeb165d36a8c919262cd17dc3c7714b7aac614df18 /lib/Crypto/PublicKey
parent20cf8add93ccd6f4e4dc60691585256ba36e7810 (diff)
downloadpycrypto-db52ac71e804e85ace3edd772d2e78055972ac2c.tar.gz
Fix RSA object serialization
Diffstat (limited to 'lib/Crypto/PublicKey')
-rw-r--r--lib/Crypto/PublicKey/RSA.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Crypto/PublicKey/RSA.py b/lib/Crypto/PublicKey/RSA.py
index bab9288..01ee84f 100644
--- a/lib/Crypto/PublicKey/RSA.py
+++ b/lib/Crypto/PublicKey/RSA.py
@@ -286,6 +286,8 @@ class _RSAobj(pubkey.pubkey):
def __setstate__(self, d):
if not hasattr(self, 'implementation'):
self.implementation = RSAImplementation()
+ if not hasattr(self, '_randfunc'):
+ self._randfunc = Random.new().read
t = []
for k in self.keydata:
if not d.has_key(k):