mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:54:59 +02:00
committed by
Brad Warren
parent
7c16e0da26
commit
f6be07da74
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user