summaryrefslogtreecommitdiff
path: root/src/OpenSSL/rand.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/OpenSSL/rand.py')
-rw-r--r--src/OpenSSL/rand.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/OpenSSL/rand.py b/src/OpenSSL/rand.py
index cf2053f..e2f6373 100644
--- a/src/OpenSSL/rand.py
+++ b/src/OpenSSL/rand.py
@@ -2,6 +2,7 @@
PRNG management routines, thin wrappers.
"""
+import warnings
from functools import partial
from six import integer_types as _integer_types
@@ -13,6 +14,12 @@ from OpenSSL._util import (
path_string as _path_string)
+warnings.warn(
+ "OpenSSL.rand is deprecated - you should use os.urandom instead",
+ DeprecationWarning, stacklevel=3
+)
+
+
class Error(Exception):
"""
An error occurred in an :mod:`OpenSSL.rand` API.