summaryrefslogtreecommitdiff
path: root/tests/test_bio.py
diff options
context:
space:
mode:
authorPetr Mensik <pemensik@redhat.com>2022-08-02 22:04:38 +0200
committerMatěj Cepl <mcepl@cepl.eu>2023-02-04 18:02:19 +0100
commit05bf70d0fb13f894536dcc83834022137a68ada0 (patch)
tree04ec94ff4455ed47cd1ade6a5ce48e00a28bbb57 /tests/test_bio.py
parent429bf9f4642a2272841ca5f3e559d5e6fe60f950 (diff)
downloadm2crypto-05bf70d0fb13f894536dcc83834022137a68ada0.tar.gz
Changed required to pass tests on OpenSSL 3.0
Just changes to make the package pass tests. Some are just cosmetic changes. Some would require proper investigation. Fixes #310
Diffstat (limited to 'tests/test_bio.py')
-rw-r--r--tests/test_bio.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_bio.py b/tests/test_bio.py
index 50fed66..5a9b86e 100644
--- a/tests/test_bio.py
+++ b/tests/test_bio.py
@@ -10,7 +10,7 @@ Author: Heikki Toivonen
"""
import logging
-from M2Crypto import BIO, Rand, six
+from M2Crypto import BIO, Rand, m2, six
from tests import unittest
from tests.fips import fips_mode
@@ -28,10 +28,11 @@ nonfips_ciphers = ['bf_ecb', 'bf_cbc', 'bf_cfb', 'bf_ofb',
# 'rc5_ecb', 'rc5_cbc', 'rc5_cfb', 'rc5_ofb',
'des_ecb', 'des_cbc', 'des_cfb', 'des_ofb',
'rc4', 'rc2_40_cbc']
-if not fips_mode: # Forbidden ciphers
+if not fips_mode and m2.OPENSSL_VERSION_NUMBER < 0x30000000: # Forbidden ciphers
ciphers += nonfips_ciphers
+
class CipherStreamTestCase(unittest.TestCase):
def try_algo(self, algo):
data = b'123456789012345678901234'