mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-07 20:11:17 +01:00
BUG/MINOR: acme: fix initialization issue in acme_gen_tmp_x509()
src/acme.c: In function ‘acme_gen_tmp_x509’:
src/acme.c:2685:15: error: ‘digest’ may be used uninitialized [-Werror=maybe-uninitialized]
2685 | if (!(X509_sign(newcrt, pkey, digest)))
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/acme.c:2628:23: note: ‘digest’ was declared here
2628 | const EVP_MD *digest;
| ^~~~~~
This commit is contained in:
parent
0524af034f
commit
22f92804d6
@ -2625,7 +2625,7 @@ X509 *acme_gen_tmp_x509()
|
||||
{
|
||||
X509 *newcrt = NULL;
|
||||
X509_NAME *name;
|
||||
const EVP_MD *digest;
|
||||
const EVP_MD *digest = NULL;
|
||||
CONF *ctmp = NULL;
|
||||
int key_type;
|
||||
EVP_PKEY *pkey = tmp_pkey;
|
||||
@ -2681,6 +2681,8 @@ X509 *acme_gen_tmp_x509()
|
||||
digest = EVP_sha256();
|
||||
else if (key_type == EVP_PKEY_EC)
|
||||
digest = EVP_sha256();
|
||||
else
|
||||
goto mkcert_error;
|
||||
|
||||
if (!(X509_sign(newcrt, pkey, digest)))
|
||||
goto mkcert_error;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user