TEST: Use OSSL_MAX_NAME_SIZE instead of arbitrary number of mdname

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14498)
This commit is contained in:
Richard Levitte 2021-03-11 16:04:16 +01:00
parent 01ba6c8e43
commit a0fff549e6

View File

@ -1375,7 +1375,7 @@ static int test_EVP_SM2(void)
OSSL_PARAM sparams[2] = {OSSL_PARAM_END, OSSL_PARAM_END}; OSSL_PARAM sparams[2] = {OSSL_PARAM_END, OSSL_PARAM_END};
OSSL_PARAM gparams[2] = {OSSL_PARAM_END, OSSL_PARAM_END}; OSSL_PARAM gparams[2] = {OSSL_PARAM_END, OSSL_PARAM_END};
int i; int i;
char mdname[20]; char mdname[OSSL_MAX_NAME_SIZE];
if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx, if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(testctx,
"SM2", testpropq))) "SM2", testpropq)))