summaryrefslogtreecommitdiff
path: root/tests/test_rsa.py
diff options
context:
space:
mode:
authorHeikki Toivonen <heikki@heikkitoivonen.net>2006-05-02 21:00:53 +0000
committerHeikki Toivonen <heikki@heikkitoivonen.net>2006-05-02 21:00:53 +0000
commit9dca8142ee7bc44acab027d0dd0007b2b3a2725d (patch)
tree84730b826cda4440c3b95c27d338fa10cba9eb82 /tests/test_rsa.py
parent9270cf1354790c08938e2db35aa99e5f1533fcfa (diff)
downloadm2crypto-9dca8142ee7bc44acab027d0dd0007b2b3a2725d.tar.gz
Since OpenSSL didn't get sha224-512 until 0.9.8, set the
versions guards in place. git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@433 2715db39-9adf-0310-9c64-84f055769b4b
Diffstat (limited to 'tests/test_rsa.py')
-rw-r--r--tests/test_rsa.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test_rsa.py b/tests/test_rsa.py
index 702487d..72009c2 100644
--- a/tests/test_rsa.py
+++ b/tests/test_rsa.py
@@ -130,12 +130,15 @@ class RSATestCase(unittest.TestCase):
Testing signing and verifying digests
"""
algos = {'sha1':'',
- 'sha224':'',
- 'sha256':'',
- 'sha384':'',
- 'sha512':'',
'ripemd160':'',
'md5':''}
+
+ if m2.OPENSSL_VERSION_NUMBER >= 0x90800F:
+ algos['sha224'] = ''
+ algos['sha256'] = ''
+ algos['sha384'] = ''
+ algos['sha512'] = ''
+
message = "This is the message string"
digest = sha.sha(message).digest()
rsa = RSA.load_key(self.privkey)