From 0b35c5d701f4873b1a6c4fe31a66c4c59db170aa Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 20 Sep 2020 17:49:09 -0400 Subject: [PATCH] Remove bindings docs (#5469) --- docs/development/c-bindings.rst | 2 +- docs/hazmat/bindings/index.rst | 22 --------------- docs/hazmat/bindings/openssl.rst | 47 -------------------------------- docs/index.rst | 1 - 4 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 docs/hazmat/bindings/index.rst delete mode 100644 docs/hazmat/bindings/openssl.rst diff --git a/docs/development/c-bindings.rst b/docs/development/c-bindings.rst index 1b58dab62..efc21ca0a 100644 --- a/docs/development/c-bindings.rst +++ b/docs/development/c-bindings.rst @@ -5,7 +5,7 @@ C bindings are bindings to C libraries, using cffi_ whenever possible. .. _cffi: https://cffi.readthedocs.io -Bindings live in :py:mod:`cryptography.hazmat.bindings`. +Bindings live in ``cryptography.hazmat.bindings``. When modifying the bindings you will need to recompile the C extensions to test the changes. This can be accomplished with ``pip install -e .`` in the diff --git a/docs/hazmat/bindings/index.rst b/docs/hazmat/bindings/index.rst deleted file mode 100644 index 655f4620d..000000000 --- a/docs/hazmat/bindings/index.rst +++ /dev/null @@ -1,22 +0,0 @@ -.. hazmat:: - -Bindings -======== - -.. module:: cryptography.hazmat.bindings - -``cryptography`` aims to provide low-level CFFI based bindings to multiple -native C libraries. These provide no automatic initialization of the library -and may not provide complete wrappers for its API. - -Using these functions directly is likely to require you to be careful in -managing memory allocation, locking and other resources. - - -Individual bindings -------------------- - -.. toctree:: - :maxdepth: 1 - - openssl diff --git a/docs/hazmat/bindings/openssl.rst b/docs/hazmat/bindings/openssl.rst deleted file mode 100644 index bc7ec2d91..000000000 --- a/docs/hazmat/bindings/openssl.rst +++ /dev/null @@ -1,47 +0,0 @@ -.. hazmat:: - -OpenSSL binding -=============== - -.. currentmodule:: cryptography.hazmat.bindings.openssl.binding - -These are `CFFI`_ bindings to the `OpenSSL`_ C library. Cryptography supports -OpenSSL version 1.0.2 and greater. - -.. class:: cryptography.hazmat.bindings.openssl.binding.Binding() - - This is the exposed API for the OpenSSL bindings. It has two public - attributes: - - .. attribute:: ffi - - This is a ``cffi.FFI`` instance. It can be used to allocate and - otherwise manipulate OpenSSL structures. - - .. attribute:: lib - - 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 several -different ways depending on the configuration of your system. For users on -OpenSSL 1.1.0 or newer (including anyone who uses a binary wheel) the OpenSSL -internal locking callbacks are automatically used. Otherwise, we first attempt -to use the callbacks provided by your Python implementation specifically for -OpenSSL. This will work in every case except where ``cryptography`` is linked -against a different version of OpenSSL than the one used by your Python -implementation. For this final case we have a C-based locking callback. - -.. _`CFFI`: https://cffi.readthedocs.io -.. _`OpenSSL`: https://www.openssl.org/ -.. _`thread safety facilities`: https://www.openssl.org/docs/man1.0.2/man3/CRYPTO_THREADID_set_callback.html diff --git a/docs/index.rst b/docs/index.rst index 396ed0b6e..ec3913f41 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -68,7 +68,6 @@ hazmat layer only when necessary. exceptions random-numbers hazmat/backends/index - hazmat/bindings/index .. toctree:: :maxdepth: 2