summaryrefslogtreecommitdiffstats
path: root/crypto/dh
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-04-06 16:05:24 +0100
committerMatt Caswell <matt@openssl.org>2020-04-09 12:24:24 +0100
commit76e23fc50b2dcf9b4d33824102ce5ae03f8faea3 (patch)
treeb62d1f7553025c0d7cd44932b99e2d0060bd5999 /crypto/dh
parent8519b244bc6c38f265bf9bad80c52bd7c0ff469f (diff)
Enable export_to functions to have access to the libctx
The EC export_to function calls EC_POINT_point2buf that can later generate a random number in some circumstances. Therefore we pass in a BN_CTX associated with the library context. This means we have to change the export_to function signature to accept the library context. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11493)
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh_ameth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c
index 86e78aaf6c..f5bcee2460 100644
--- a/crypto/dh/dh_ameth.c
+++ b/crypto/dh/dh_ameth.c
@@ -491,7 +491,8 @@ static size_t dh_pkey_dirty_cnt(const EVP_PKEY *pkey)
}
static int dh_pkey_export_to(const EVP_PKEY *from, void *to_keydata,
- EVP_KEYMGMT *to_keymgmt)
+ EVP_KEYMGMT *to_keymgmt, OPENSSL_CTX *libctx,
+ const char *propq)
{
DH *dh = from->pkey.dh;
OSSL_PARAM_BLD *tmpl;