mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
(cherry picked from commit f6be07da74)
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
import binascii
|
import binascii
|
||||||
import contextlib
|
import contextlib
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
import sys
|
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."
|
assert domains, "Must provide one or more hostnames for the cert."
|
||||||
cert = OpenSSL.crypto.X509()
|
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)
|
cert.set_version(2)
|
||||||
|
|
||||||
extensions = [
|
extensions = [
|
||||||
|
|||||||
Reference in New Issue
Block a user