Use Stronger digest than sha1 for signing certs
With OpenSSL 3.0[1] sha1 can't be used with default security level, let's use stronger digest that's supported i.e sha256. [1] https://github.com/openssl/openssl/commit/aba03ae Change-Id: I18fc7f85d1649a47000fa1a3289ab449e94be608
This commit is contained in:
@ -141,7 +141,7 @@ def generate_ssl_cert(config, host, service, ssl_key_file, ssl_cert_file):
|
||||
cert.set_pubkey(k)
|
||||
serial = int(time())
|
||||
cert.set_serial_number(serial)
|
||||
cert.sign(ca_key, 'sha1')
|
||||
cert.sign(ca_key, 'sha256')
|
||||
|
||||
final_cert = crypto.dump_certificate(crypto.FILETYPE_PEM, cert)
|
||||
final_key = crypto.dump_privatekey(crypto.FILETYPE_PEM, k)
|
||||
|
@ -278,7 +278,7 @@ def create_self_signed_cert(config, messages):
|
||||
"keyid:always".encode('ascii'), issuer=cert)
|
||||
])
|
||||
|
||||
cert.sign(k, 'sha1')
|
||||
cert.sign(k, 'sha256')
|
||||
|
||||
open((CERT_FILE), "w").write(
|
||||
crypto.dump_certificate(crypto.FILETYPE_PEM, cert).decode())
|
||||
|
Reference in New Issue
Block a user