blob: 404573a3eb9c26f659beb04b379c477875a72ed0 [file] [log] [blame]
Alex Gaynoraf82d5e2013-10-29 17:07:24 -07001.. hazmat::
Alex Gaynor0f7f7812013-09-30 10:52:36 -07002
Alex Gaynor8f42fe42013-12-24 13:15:52 -08003OpenSSL Backend
4===============
Donald Stuffte51fb932013-10-27 17:26:17 -04005
Alex Stapletonc368ac22013-12-31 13:43:38 +00006The `OpenSSL`_ C library.
Alex Gaynor6d02e2d2013-09-30 10:37:22 -07007
Alex Gaynorf8796b12013-12-13 20:28:55 -08008.. data:: cryptography.hazmat.backends.openssl.backend
Alex Gaynor6d02e2d2013-09-30 10:37:22 -07009
Alex Stapletonc368ac22013-12-31 13:43:38 +000010 This is the exposed API for the OpenSSL backend. It has no public attributes.
Alex Gaynor6d02e2d2013-09-30 10:37:22 -070011
Alex Stapletone68d73e2013-12-31 14:00:38 +000012Using your own OpenSSL on Linux
13-------------------------------
14
15Python links to OpenSSL for its own purposes and this can sometimes cause
16problems when you wish to use a different version of OpenSSL with cryptography.
17If you want to use cryptography with your own build of OpenSSL you will need to
18make sure that the build is configured correctly so that your version of
19OpenSSL doesn't conflict with Python's.
20
21The options you need to add allow the linker to identify every symbol correctly
22even when multiple versions of the library are linked into the same program. If
23you are using your distribution's source packages these will probably be
24patched in for you already, otherwise you'll need to use options something like
25this when configuring OpenSSL::
26
27 ./config -Wl,--version-script=openssl.ld -Wl,-Bsymbolic-functions -fPIC shared
28
29You'll also need to generate your own ``openssl.ld`` file. For example::
30
31 OPENSSL_1.0.1F_CUSTOM {
32 global:
33 *;
34 };
35
36You should replace the version string on the first line as appropriate for your
37build.
38
Alex Gaynor6d02e2d2013-09-30 10:37:22 -070039.. _`OpenSSL`: https://www.openssl.org/