From db52ac71e804e85ace3edd772d2e78055972ac2c Mon Sep 17 00:00:00 2001 From: Frank Sievertsen Date: Mon, 19 Nov 2012 08:21:21 +0100 Subject: Fix RSA object serialization --- lib/Crypto/PublicKey/RSA.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Crypto/PublicKey') 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): -- cgit v1.2.1