From f11961c29fa90a34fea3be9937294a7ee49bd346 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Fri, 4 Oct 2024 11:05:16 +0200 Subject: [PATCH] Use more future-proof hash for signature (#532) Signed-off-by: Dmitry Belyavskiy --- test/tlstest_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tlstest_helpers.c b/test/tlstest_helpers.c index 047d45f5..93626f54 100644 --- a/test/tlstest_helpers.c +++ b/test/tlstest_helpers.c @@ -27,7 +27,7 @@ int create_cert_key(OSSL_LIB_CTX *libctx, char *algname, char *certfilename, !X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char *)"localhost", -1, -1, 0) || !X509_set_issuer_name(x509, name) || - !X509_sign(x509, pkey, EVP_sha1()) || + !X509_sign(x509, pkey, EVP_sha256()) || !(keybio = BIO_new_file(privkeyfilename, "wb")) || !PEM_write_bio_PrivateKey(keybio, pkey, NULL, NULL, 0, NULL, NULL) || !(certbio = BIO_new_file(certfilename, "wb")) ||