aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/backends/openssl/backend.py7
-rw-r--r--src/cryptography/hazmat/bindings/openssl/binding.py6
2 files changed, 6 insertions, 7 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
index 8c4abcd6..197bcb8c 100644
--- a/src/cryptography/hazmat/backends/openssl/backend.py
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
@@ -529,13 +529,6 @@ class Backend(object):
self._binding.init_static_locks()
- # adds all ciphers/digests for EVP
- self._lib.OpenSSL_add_all_algorithms()
- # registers available SSL/TLS ciphers and digests
- self._lib.SSL_library_init()
- # loads error strings for libcrypto and libssl functions
- self._lib.SSL_load_error_strings()
-
self._cipher_registry = {}
self._register_default_ciphers()
self.activate_osrandom_engine()
diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py
index e18d89c5..50d7f6d5 100644
--- a/src/cryptography/hazmat/bindings/openssl/binding.py
+++ b/src/cryptography/hazmat/bindings/openssl/binding.py
@@ -92,6 +92,12 @@ class Binding(object):
if not cls._lib_loaded:
cls.lib = build_conditional_library(lib, CONDITIONAL_NAMES)
cls._lib_loaded = True
+ # initialize the SSL library
+ cls.lib.SSL_library_init()
+ # adds all ciphers/digests for EVP
+ cls.lib.OpenSSL_add_all_algorithms()
+ # loads error strings for libcrypto and libssl functions
+ cls.lib.SSL_load_error_strings()
cls._register_osrandom_engine()
@classmethod