Alex Gaynor | af82d5e | 2013-10-29 17:07:24 -0700 | [diff] [blame] | 1 | .. hazmat:: |
Alex Gaynor | 0f7f781 | 2013-09-30 10:52:36 -0700 | [diff] [blame] | 2 | |
Alex Gaynor | 8f42fe4 | 2013-12-24 13:15:52 -0800 | [diff] [blame] | 3 | OpenSSL Backend |
| 4 | =============== |
Donald Stufft | e51fb93 | 2013-10-27 17:26:17 -0400 | [diff] [blame] | 5 | |
Alex Stapleton | c368ac2 | 2013-12-31 13:43:38 +0000 | [diff] [blame] | 6 | The `OpenSSL`_ C library. |
Alex Gaynor | 6d02e2d | 2013-09-30 10:37:22 -0700 | [diff] [blame] | 7 | |
Alex Gaynor | f8796b1 | 2013-12-13 20:28:55 -0800 | [diff] [blame] | 8 | .. data:: cryptography.hazmat.backends.openssl.backend |
Alex Gaynor | 6d02e2d | 2013-09-30 10:37:22 -0700 | [diff] [blame] | 9 | |
Paul Kehrer | 2502ce5 | 2014-01-18 09:32:47 -0600 | [diff] [blame] | 10 | This is the exposed API for the OpenSSL backend. It has one public attribute. |
| 11 | |
| 12 | .. attribute:: name |
| 13 | |
| 14 | The string name of the backend. |
Alex Gaynor | 6d02e2d | 2013-09-30 10:37:22 -0700 | [diff] [blame] | 15 | |
Alex Stapleton | e68d73e | 2013-12-31 14:00:38 +0000 | [diff] [blame] | 16 | Using your own OpenSSL on Linux |
| 17 | ------------------------------- |
| 18 | |
| 19 | Python links to OpenSSL for its own purposes and this can sometimes cause |
| 20 | problems when you wish to use a different version of OpenSSL with cryptography. |
| 21 | If you want to use cryptography with your own build of OpenSSL you will need to |
| 22 | make sure that the build is configured correctly so that your version of |
| 23 | OpenSSL doesn't conflict with Python's. |
| 24 | |
| 25 | The options you need to add allow the linker to identify every symbol correctly |
| 26 | even when multiple versions of the library are linked into the same program. If |
| 27 | you are using your distribution's source packages these will probably be |
| 28 | patched in for you already, otherwise you'll need to use options something like |
| 29 | this when configuring OpenSSL:: |
| 30 | |
| 31 | ./config -Wl,--version-script=openssl.ld -Wl,-Bsymbolic-functions -fPIC shared |
| 32 | |
| 33 | You'll also need to generate your own ``openssl.ld`` file. For example:: |
| 34 | |
| 35 | OPENSSL_1.0.1F_CUSTOM { |
| 36 | global: |
| 37 | *; |
| 38 | }; |
| 39 | |
| 40 | You should replace the version string on the first line as appropriate for your |
| 41 | build. |
| 42 | |
Alex Gaynor | 6d02e2d | 2013-09-30 10:37:22 -0700 | [diff] [blame] | 43 | .. _`OpenSSL`: https://www.openssl.org/ |