summaryrefslogtreecommitdiff
path: root/src/OpenSSL/rand.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-05-31 05:03:27 -0400
committerHynek Schlawack <hs@ox.cx>2017-05-31 11:03:27 +0200
commit3ed6273b8f1a64e26ae6e52e21870fe5f1951066 (patch)
tree47a9172f486ae00f30cc0019385fa0d095e0e868 /src/OpenSSL/rand.py
parent0d2aec53b165cd32e66dce647f3642a4eb4bc4bc (diff)
downloadpyopenssl-3ed6273b8f1a64e26ae6e52e21870fe5f1951066.tar.gz
Drop the deprecated rand.egd function (#630)
* Drop the deprecated rand.egd function * Removed egd tests * Removed egd docs * Document the removal * unused imports * Update CHANGELOG.rst
Diffstat (limited to 'src/OpenSSL/rand.py')
-rw-r--r--src/OpenSSL/rand.py35
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.