CVS: crypto/PublicKey DSA.py,1.15,1.16 RSA.py,1.19,1.20

"A.M. Kuchling" <[email protected]> Thu, 06 May 2004 05:52:58 -0700
Newsgroups gmane.comp.python.cryptography.cvs
Message-ID <[email protected]>
Update of /cvsroot/pycrypto/crypto/PublicKey
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18577/PublicKey

Modified Files:
	DSA.py RSA.py 
Log Message:
[Bug #765636] Repair 2.3-specific use of 'not in'

Index: DSA.py
===================================================================
RCS file: /cvsroot/pycrypto/crypto/PublicKey/DSA.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DSA.py	4 Apr 2003 19:44:25 -0000	1.15
+++ DSA.py	6 May 2004 12:52:54 -0000	1.16
@@ -195,7 +195,7 @@
 
     def __setstate__(self, state):
         y,g,p,q = state['y'], state['g'], state['p'], state['q']
-        if 'x' not in state:
+        if not state.has_key('x'):
             self.key = _fastmath.dsa_construct(y,g,p,q)
         else:
             x = state['x']

Index: RSA.py
===================================================================
RCS file: /cvsroot/pycrypto/crypto/PublicKey/RSA.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- RSA.py	4 Apr 2003 19:42:07 -0000	1.19
+++ RSA.py	6 May 2004 12:52:54 -0000	1.20
@@ -167,11 +167,11 @@
 
     def __setstate__(self, state):
         n,e = state['n'], state['e']
-        if 'd' not in state:
+        if not state.has_key('d'):
             self.key = _fastmath.rsa_construct(n,e)
         else:
             d = state['d']
-            if 'q' not in state:
+            if not state.has_key('q'):
                 self.key = _fastmath.rsa_construct(n,e,d)
             else:
                 p, q, u = state['p'], state['q'], state['u']



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3