aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/bindings/openssl/binding.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-10-27 10:29:43 +0900
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-10-27 10:29:43 +0900
commit1de222d8f35fcf56650fdfff0314566e24dcb055 (patch)
treec283b56ab47abb6fa2771632ce63db3266220d1c /src/cryptography/hazmat/bindings/openssl/binding.py
parenta4ff3ca63c175db7aa629205c5f52113ba4608a4 (diff)
downloadcryptography-1de222d8f35fcf56650fdfff0314566e24dcb055.tar.gz
cryptography-1de222d8f35fcf56650fdfff0314566e24dcb055.tar.bz2
cryptography-1de222d8f35fcf56650fdfff0314566e24dcb055.zip
modify sadness prose
Diffstat (limited to 'src/cryptography/hazmat/bindings/openssl/binding.py')
-rw-r--r--src/cryptography/hazmat/bindings/openssl/binding.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py
index e8bf267b..a750cd6b 100644
--- a/src/cryptography/hazmat/bindings/openssl/binding.py
+++ b/src/cryptography/hazmat/bindings/openssl/binding.py
@@ -174,7 +174,9 @@ class Binding(object):
)
-# OpenSSL is not thread safe until the locks are initialized. We initialize in
-# module scope to cause initialization whenever this module is imported (and
-# try to get some benefit from the import lock).
+# OpenSSL is not thread safe until the locks are initialized. We call this
+# method in module scope so that it executes with the import lock. On
+# Pythons < 3.4 this import lock is a global lock, which can prevent a race
+# condition registering the OpenSSL locks. On Python 3.4+ the import lock
+# is per module so this approach will not work.
Binding.init_static_locks()