Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6b2b084

Browse files
committed
Issue #19508: direct the user to read the security considerations for the ssl module
2 parents 633db6f + 9eefe91 commit 6b2b084

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

Doc/library/ssl.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ probably additional platforms, as long as OpenSSL is installed on that platform.
3030
openssl version 1.0.1.
3131

3232
.. warning::
33+
Don't use this module without reading the :ref:`ssl-security`. Doing so
34+
may lead to a false sense of security, as the default settings of the
35+
ssl module are not necessarily appropriate for your application.
3336

34-
OpenSSL's internal random number generator does not properly handle fork.
35-
Applications must change the PRNG state of the parent process if they use
36-
any SSL feature with :func:`os.fork`. Any successful call of
37-
:func:`~ssl.RAND_add`, :func:`~ssl.RAND_bytes` or
38-
:func:`~ssl.RAND_pseudo_bytes` is sufficient.
3937

4038
This section documents the objects and functions in the ``ssl`` module; for more
4139
general information about TLS, SSL, and certificates, the reader is referred to
@@ -1480,6 +1478,17 @@ format <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT>`_.
14801478
If you want to check which ciphers are enabled by a given cipher list,
14811479
use the ``openssl ciphers`` command on your system.
14821480

1481+
Multi-processing
1482+
^^^^^^^^^^^^^^^^
1483+
1484+
If using this module as part of a multi-processed application (using,
1485+
for example the :mod:`multiprocessing` or :mod:`concurrent.futures` modules),
1486+
be aware that OpenSSL's internal random number generator does not properly
1487+
handle forked processes. Applications must change the PRNG state of the
1488+
parent process if they use any SSL feature with :func:`os.fork`. Any
1489+
successful call of :func:`~ssl.RAND_add`, :func:`~ssl.RAND_bytes` or
1490+
:func:`~ssl.RAND_pseudo_bytes` is sufficient.
1491+
14831492

14841493
.. seealso::
14851494

0 commit comments

Comments
 (0)