OpenSSL 3 fixes: use SHA256 instead of SHA1

OpenSSL 3.x does not support signing certificates with SHA1 by default.
Use SHA256 instead.
This commit is contained in:
Peter Edwards 2022-06-27 22:00:05 +01:00
parent 1c204d5564
commit e563c9b206

View File

@ -103,7 +103,7 @@ ssl_getcert(EVP_PKEY *key)
now += 3600;
X509_time_adj(X509_getm_notAfter(x509), 0, &now);
X509_set_pubkey(x509, key);
tt_assert(0 != X509_sign(x509, key, EVP_sha1()));
tt_assert(0 != X509_sign(x509, key, EVP_sha256()));
return x509;
end: