aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-acme-dont-use-openssl-rand.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-09-20 18:49:26 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-09-20 18:49:26 +0200
commit58366883f2f1516a4a02f5b4e2a70e86481827b5 (patch)
treefa67d714c4596164b341118132728a48135f4759 /gnu/packages/patches/python-acme-dont-use-openssl-rand.patch
parentf40aef6b3b56e1e5fb6e6ac29bd372000e13982f (diff)
parent9a1c4a981bdd7eeca76aaf73a57d6841918821c2 (diff)
downloadguix-58366883f2f1516a4a02f5b4e2a70e86481827b5.tar
guix-58366883f2f1516a4a02f5b4e2a70e86481827b5.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches/python-acme-dont-use-openssl-rand.patch')
-rw-r--r--gnu/packages/patches/python-acme-dont-use-openssl-rand.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-acme-dont-use-openssl-rand.patch b/gnu/packages/patches/python-acme-dont-use-openssl-rand.patch
new file mode 100644
index 0000000000..78920629c0
--- /dev/null
+++ b/gnu/packages/patches/python-acme-dont-use-openssl-rand.patch
@@ -0,0 +1,28 @@
+Fix build with PyOpenSSL > 17.2.0.
+
+See <https://github.com/certbot/certbot/issues/5111>.
+
+Patch copied from upstream source repository:
+https://github.com/certbot/certbot/commit/f6be07da74c664b57ac8c053585f919c79f9af44
+
+diff --git a/acme/crypto_util.py b/acme/crypto_util.py
+index de15284c03..b8fba03488 100644
+--- a/acme/crypto_util.py
++++ b/acme/crypto_util.py
+@@ -2,6 +2,7 @@
+ import binascii
+ import contextlib
+ import logging
++import os
+ import re
+ import socket
+ import sys
+@@ -243,7 +244,7 @@ def gen_ss_cert(key, domains, not_before=None,
+ """
+ assert domains, "Must provide one or more hostnames for the cert."
+ cert = OpenSSL.crypto.X509()
+- cert.set_serial_number(int(binascii.hexlify(OpenSSL.rand.bytes(16)), 16))
++ cert.set_serial_number(int(binascii.hexlify(os.urandom(16)), 16))
+ cert.set_version(2)
+
+ extensions = [