Ensure cipher_generic_initkey gets passed the actual provider ctx

We were not correctly passing the provider ctx down the chain during
initialisation of a new cipher ctx. Instead the provider ctx got set to
NULL.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12288)
This commit is contained in:
Matt Caswell 2020-06-22 15:04:50 +01:00
parent 1ae7354c04
commit 978cc3648d

View File

@ -175,7 +175,8 @@ static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \
if (ctx != NULL) { \
cipher_generic_initkey(ctx, kbits, blkbits, ivbits, \
EVP_CIPH_##UCMODE##_MODE, flags, \
PROV_CIPHER_HW_##alg##_##lcmode(kbits), NULL); \
PROV_CIPHER_HW_##alg##_##lcmode(kbits), \
provctx); \
} \
return ctx; \
} \