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 | |
Alex Stapleton | c368ac2 | 2013-12-31 13:43:38 +0000 | [diff] [blame^] | 10 | This is the exposed API for the OpenSSL backend. It has no public attributes. |
Alex Gaynor | 6d02e2d | 2013-09-30 10:37:22 -0700 | [diff] [blame] | 11 | |
Alex Stapleton | e68d73e | 2013-12-31 14:00:38 +0000 | [diff] [blame] | 12 | Using your own OpenSSL on Linux |
| 13 | ------------------------------- |
| 14 | |
| 15 | Python links to OpenSSL for its own purposes and this can sometimes cause |
| 16 | problems when you wish to use a different version of OpenSSL with cryptography. |
| 17 | If you want to use cryptography with your own build of OpenSSL you will need to |
| 18 | make sure that the build is configured correctly so that your version of |
| 19 | OpenSSL doesn't conflict with Python's. |
| 20 | |
| 21 | The options you need to add allow the linker to identify every symbol correctly |
| 22 | even when multiple versions of the library are linked into the same program. If |
| 23 | you are using your distribution's source packages these will probably be |
| 24 | patched in for you already, otherwise you'll need to use options something like |
| 25 | this when configuring OpenSSL:: |
| 26 | |
| 27 | ./config -Wl,--version-script=openssl.ld -Wl,-Bsymbolic-functions -fPIC shared |
| 28 | |
| 29 | You'll also need to generate your own ``openssl.ld`` file. For example:: |
| 30 | |
| 31 | OPENSSL_1.0.1F_CUSTOM { |
| 32 | global: |
| 33 | *; |
| 34 | }; |
| 35 | |
| 36 | You should replace the version string on the first line as appropriate for your |
| 37 | build. |
| 38 | |
Alex Gaynor | 6d02e2d | 2013-09-30 10:37:22 -0700 | [diff] [blame] | 39 | .. _`OpenSSL`: https://www.openssl.org/ |