]> granicus.if.org Git - python/commitdiff
Issue #18747: document issue with OpenSSL's CPRNG state and fork
authorChristian Heimes <christian@cheimes.de>
Tue, 29 Oct 2013 20:08:56 +0000 (21:08 +0100)
committerChristian Heimes <christian@cheimes.de>
Tue, 29 Oct 2013 20:08:56 +0000 (21:08 +0100)
Doc/library/os.rst
Doc/library/ssl.rst

index 715f6543b745d06162f9db7fdc7ebd6efad434c7..ebba21ac46000838b0db78bda53c1053cfe3f52c 100644 (file)
@@ -1809,6 +1809,10 @@ written in Python, such as a mail server's external command delivery program.
    Note that some platforms including FreeBSD <= 6.3, Cygwin and OS/2 EMX have
    known issues when using fork() from a thread.
 
+   .. warning::
+
+      See :mod:`ssl` for applications that use the SSL module with fork().
+
    Availability: Unix.
 
 
index 0f5cea2f0b2659e8bb90f4ea4948ddd0e78965e6..56fcc524c89b828a40417e942260bde30bc2f9c8 100644 (file)
@@ -28,6 +28,14 @@ probably additional platforms, as long as OpenSSL is installed on that platform.
    operating system socket APIs.  The installed version of OpenSSL may also
    cause variations in behavior.
 
+.. warning::
+
+   OpenSSL's internal random number generator does not properly handle fork.
+   Applications must change the PRNG state of the parent process if they use
+   any SSL feature with with :func:`os.fork`. Any successful call of
+   :func:`~ssl.RAND_add`, :func:`~ssl.RAND_bytes` or
+   :func:`~ssl.RAND_pseudo_bytes` is sufficient.
+
 This section documents the objects and functions in the ``ssl`` module; for more
 general information about TLS, SSL, and certificates, the reader is referred to
 the documents in the "See Also" section at the bottom.