From f3336f40508dfd4821f0048b149ffb45f8f08875 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 24 Apr 2020 15:43:20 +0100 Subject: Add the library ctx into an ECX_KEY At various points we need to be able to retrieve the current library context so we store it in the ECX_KEY structure. Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/11635) --- crypto/ec/ecx_key.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crypto/ec/ecx_key.c') diff --git a/crypto/ec/ecx_key.c b/crypto/ec/ecx_key.c index 0b43d26ae4..46abd57a74 100644 --- a/crypto/ec/ecx_key.c +++ b/crypto/ec/ecx_key.c @@ -10,13 +10,14 @@ #include #include "crypto/ecx.h" -ECX_KEY *ecx_key_new(ECX_KEY_TYPE type, int haspubkey) +ECX_KEY *ecx_key_new(OPENSSL_CTX *libctx, ECX_KEY_TYPE type, int haspubkey) { ECX_KEY *ret = OPENSSL_zalloc(sizeof(*ret)); if (ret == NULL) return NULL; + ret->libctx = libctx; ret->haspubkey = haspubkey; switch (type) { case ECX_KEY_TYPE_X25519: -- cgit v1.2.3