summaryrefslogtreecommitdiff
path: root/crypto/evp/exchange.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-10-31 12:10:01 +0100
committerRichard Levitte <levitte@openssl.org>2019-11-10 05:00:28 +0100
commit0ddf74bf1c47b554c3d2c086ff2acb18bcc81bc6 (patch)
treef24485c27e5c6c4a1da84a948f42ab750bd7a89e /crypto/evp/exchange.c
parent7b97581b90822a8c3027686234fb56ea5346db15 (diff)
downloadopenssl-new-0ddf74bf1c47b554c3d2c086ff2acb18bcc81bc6.tar.gz
Final cleanup after move to leaner EVP_PKEY methods
Now that KEYMGMT method pointers have moved away from the diverse methods that are used with EVP_PKEY_CTX, we no longer need to pass special argument to evp_generic_fetch() and evp_generic_do_all(). Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10309)
Diffstat (limited to 'crypto/evp/exchange.c')
-rw-r--r--crypto/evp/exchange.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/crypto/evp/exchange.c b/crypto/evp/exchange.c
index 6e1372e042..aebfbaf3da 100644
--- a/crypto/evp/exchange.c
+++ b/crypto/evp/exchange.c
@@ -34,8 +34,7 @@ static EVP_KEYEXCH *evp_keyexch_new(OSSL_PROVIDER *prov)
static void *evp_keyexch_from_dispatch(int name_id,
const OSSL_DISPATCH *fns,
- OSSL_PROVIDER *prov,
- void *unused)
+ OSSL_PROVIDER *prov)
{
EVP_KEYEXCH *exchange = NULL;
int fncnt = 0, paramfncnt = 0;
@@ -148,14 +147,10 @@ OSSL_PROVIDER *EVP_KEYEXCH_provider(const EVP_KEYEXCH *exchange)
EVP_KEYEXCH *EVP_KEYEXCH_fetch(OPENSSL_CTX *ctx, const char *algorithm,
const char *properties)
{
- EVP_KEYEXCH *keyexch = NULL;
-
- keyexch = evp_generic_fetch(ctx, OSSL_OP_KEYEXCH, algorithm, properties,
- evp_keyexch_from_dispatch, NULL,
- (int (*)(void *))EVP_KEYEXCH_up_ref,
- (void (*)(void *))EVP_KEYEXCH_free);
-
- return keyexch;
+ return evp_generic_fetch(ctx, OSSL_OP_KEYEXCH, algorithm, properties,
+ evp_keyexch_from_dispatch,
+ (int (*)(void *))EVP_KEYEXCH_up_ref,
+ (void (*)(void *))EVP_KEYEXCH_free);
}
int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx)
@@ -378,7 +373,7 @@ void EVP_KEYEXCH_do_all_provided(OPENSSL_CTX *libctx,
{
evp_generic_do_all(libctx, OSSL_OP_KEYEXCH,
(void (*)(void *, void *))fn, arg,
- evp_keyexch_from_dispatch, NULL,
+ evp_keyexch_from_dispatch,
(void (*)(void *))EVP_KEYEXCH_free);
}