From 9dca8142ee7bc44acab027d0dd0007b2b3a2725d Mon Sep 17 00:00:00 2001 From: Heikki Toivonen Date: Tue, 2 May 2006 21:00:53 +0000 Subject: 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 --- tests/test_rsa.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/test_rsa.py') 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) -- cgit v1.2.1