diff options
author | Matt Caswell <matt@openssl.org> | 2020-04-24 16:43:20 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-05-04 10:30:55 +0200 |
commit | f3336f40508dfd4821f0048b149ffb45f8f08875 (patch) | |
tree | 52a1f40fa1a1b51d577045e69445a26f8311d88e /crypto/ec/ecx_key.c | |
parent | Add the ability to ECX to import keys with only the private key (diff) | |
download | openssl-f3336f40508dfd4821f0048b149ffb45f8f08875.tar.xz openssl-f3336f40508dfd4821f0048b149ffb45f8f08875.zip |
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.c | 3 |
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: |