From: Matt Caswell Date: Mon, 22 Jun 2020 14:04:50 +0000 (+0100) Subject: Ensure cipher_generic_initkey gets passed the actual provider ctx X-Git-Tag: openssl-3.0.0-alpha5~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=978cc3648d02551c6ada328708306dad2d3ce07a;p=thirdparty%2Fopenssl.git 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 (Merged from https://github.com/openssl/openssl/pull/12288) --- diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h index 18bb5790267..55adf3caa2f 100644 --- a/providers/implementations/include/prov/ciphercommon.h +++ b/providers/implementations/include/prov/ciphercommon.h @@ -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; \ } \