diff options
Diffstat (limited to 'src/OpenSSL/rand.py')
-rw-r--r-- | src/OpenSSL/rand.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/OpenSSL/rand.py b/src/OpenSSL/rand.py index 8f51ad8..09cf988 100644 --- a/src/OpenSSL/rand.py +++ b/src/OpenSSL/rand.py @@ -2,9 +2,6 @@ PRNG management routines, thin wrappers. """ -import os -import warnings - from functools import partial from six import integer_types as _integer_types @@ -113,38 +110,6 @@ def status(): return _lib.RAND_status() -def egd(path, bytes=_unspecified): - """ - Query the system random source and seed the PRNG. - - Does *not* actually query the EGD. - - .. deprecated:: 16.0.0 - EGD was only necessary for some commercial UNIX systems that all - reached their ends of life more than a decade ago. See - `pyca/cryptography#1636 - <https://github.com/pyca/cryptography/pull/1636>`_. - - :param path: Ignored. - :param bytes: (optional) The number of bytes to read, default is 255. - - :returns: ``len(bytes)`` or 255 if not specified. - """ - warnings.warn("OpenSSL.rand.egd() is deprecated as of 16.0.0.", - DeprecationWarning) - - if not isinstance(path, _builtin_bytes): - raise TypeError("path must be a byte string") - - if bytes is _unspecified: - bytes = 255 - elif not isinstance(bytes, int): - raise TypeError("bytes must be an integer") - - seed(os.urandom(bytes)) - return bytes - - def cleanup(): """ Erase the memory used by the PRNG. |