summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecx_key.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-04-24 15:43:20 +0100
committerMatt Caswell <matt@openssl.org>2020-05-04 09:30:55 +0100
commitf3336f40508dfd4821f0048b149ffb45f8f08875 (patch)
tree52a1f40fa1a1b51d577045e69445a26f8311d88e /crypto/ec/ecx_key.c
parent969024b4580172b1cd836550e227d64515c628bc (diff)
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 <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11635)
Diffstat (limited to 'crypto/ec/ecx_key.c')
-rw-r--r--crypto/ec/ecx_key.c3
1 files changed, 2 insertions, 1 deletions
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 <openssl/err.h>
#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: