commit c10eb79832f64659978eb948ff5e52ca6d95380b Author: David Goulet dgoulet@torproject.org Date: Tue Feb 26 13:41:48 2019 -0500
Remove deprecated OpenSSL.rand.bytes()
"OpenSSL.rand is deprecated - you should use os.urandom instead"
Signed-off-by: David Goulet dgoulet@torproject.org --- bridgedb/crypto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bridgedb/crypto.py b/bridgedb/crypto.py index 13af305..ac2e3ec 100644 --- a/bridgedb/crypto.py +++ b/bridgedb/crypto.py @@ -200,7 +200,7 @@ def getKey(filename): fh = open(filename, 'rb') except IOError: logging.debug("getKey(): Creating new secret key.") - key = OpenSSL.rand.bytes(32) + key = os.urandom(32) writeKeyToFile(key, filename) else: logging.debug("getKey(): Secret key file found. Loading...")
tor-commits@lists.torproject.org