aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2019-11-24 18:16:14 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2019-11-25 07:16:14 +0800
commitaa7c2992c91ea90dc967e6acc6b2fb190aed0000 (patch)
tree00a7fed58428e1da1237d43482daaabd7b8d8ec3 /src
parent86b4b391edbb1de734c2baed0939a111a420a6f4 (diff)
downloadcryptography-aa7c2992c91ea90dc967e6acc6b2fb190aed0000.tar.gz
cryptography-aa7c2992c91ea90dc967e6acc6b2fb190aed0000.tar.bz2
cryptography-aa7c2992c91ea90dc967e6acc6b2fb190aed0000.zip
Fixes #5065 -- skip serialization tests which use RC2 if OpenSSL doesn't have RC2 (#5072)
* Refs #5065 -- have a CI job with OpenSSL built with no-rc2 * Fixes #5065 -- skip serialization tests which use RC2 if OpenSSL doesn't have RC2
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/backends/openssl/backend.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
index 7e9fa202..96fa9ff6 100644
--- a/src/cryptography/hazmat/backends/openssl/backend.py
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
@@ -94,6 +94,11 @@ from cryptography.x509 import ocsp
_MemoryBIO = collections.namedtuple("_MemoryBIO", ["bio", "char_ptr"])
+# Not actually supported, just used as a marker for some serialization tests.
+class _RC2(object):
+ pass
+
+
@utils.register_interface(CipherBackend)
@utils.register_interface(CMACBackend)
@utils.register_interface(DERSerializationBackend)
@@ -292,6 +297,10 @@ class Backend(object):
type(None),
GetCipherByName("rc4")
)
+ # We don't actually support RC2, this is just used by some tests.
+ self.register_cipher_adapter(
+ _RC2, type(None), GetCipherByName("rc2")
+ )
self.register_cipher_adapter(
ChaCha20,
type(None),