diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-24 12:44:33 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-24 12:44:33 -0800 |
commit | f2e34bee281c38e782af9d99a44ffe6210c04184 (patch) | |
tree | 47d97ca4540077106f7102e8e19fcf566fbbe7d2 /docs | |
parent | 12532f67a03c1681f455211b00315765311a17a5 (diff) | |
parent | 29446cd8315985680fd2af0d0137c3d1c4c2a4a1 (diff) | |
download | cryptography-f2e34bee281c38e782af9d99a44ffe6210c04184.tar.gz cryptography-f2e34bee281c38e782af9d99a44ffe6210c04184.tar.bz2 cryptography-f2e34bee281c38e782af9d99a44ffe6210c04184.zip |
Merge pull request #492 from public/py-thread-safe
Python implementation of OpenSSL locking callback
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/bindings/openssl.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/hazmat/bindings/openssl.rst b/docs/hazmat/bindings/openssl.rst index 373fe472..557f8c4d 100644 --- a/docs/hazmat/bindings/openssl.rst +++ b/docs/hazmat/bindings/openssl.rst @@ -22,6 +22,26 @@ These are `CFFI`_ bindings to the `OpenSSL`_ C library. This is a ``cffi`` library. It can be used to call OpenSSL functions, and access constants. + .. classmethod:: init_static_locks + + Enables the best available locking callback for OpenSSL. + See :ref:`openssl-threading`. + +.. _openssl-threading: + +Threading +--------- + +``cryptography`` enables OpenSSLs `thread safety facilities`_ in two different +ways depending on the configuration of your system. Normally the locking +callbacks provided by your Python implementation specifically for OpenSSL will +be used. However if you have linked ``cryptography`` to a different version of +OpenSSL than that used by your Python implementation we enable an alternative +locking callback. This version is implemented in Python and so may result in +lower performance in some situations. In particular parallelism is reduced +because it has to acquire the GIL whenever any lock operations occur within +OpenSSL. .. _`CFFI`: https://cffi.readthedocs.org/ .. _`OpenSSL`: https://www.openssl.org/ +.. _`thread safety facilities`: http://www.openssl.org/docs/crypto/threads.html |