From 76e23fc50b2dcf9b4d33824102ce5ae03f8faea3 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 6 Apr 2020 16:05:24 +0100 Subject: 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 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/11493) --- crypto/dh/dh_ameth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crypto/dh') 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; -- cgit v1.2.3