summaryrefslogtreecommitdiffstats
path: root/providers/implementations/exchange
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-01-24 20:37:09 +0100
committerRichard Levitte <levitte@openssl.org>2021-01-26 15:51:50 +0100
commitba0a6d1deb20d81bbf89b365c5c73879cbe0fae7 (patch)
treef7eb202d844136c8f427c3eed9f5bc92d6be755d /providers/implementations/exchange
parent7b0f64b121860be91506906a2dc024e352b3d216 (diff)
Clean away unnecessary length related OSSL_PARAM key names
This cleans away old misunderstandings of what can be done with OSSL_PARAM. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13946)
Diffstat (limited to 'providers/implementations/exchange')
-rw-r--r--providers/implementations/exchange/dh_exch.c8
-rw-r--r--providers/implementations/exchange/ecdh_exch.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/providers/implementations/exchange/dh_exch.c b/providers/implementations/exchange/dh_exch.c
index d8689f5c53..b51c418458 100644
--- a/providers/implementations/exchange/dh_exch.c
+++ b/providers/implementations/exchange/dh_exch.c
@@ -395,7 +395,6 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
OSSL_PARAM_size_t(OSSL_EXCHANGE_PARAM_KDF_OUTLEN, NULL),
OSSL_PARAM_DEFN(OSSL_EXCHANGE_PARAM_KDF_UKM, OSSL_PARAM_OCTET_PTR,
NULL, 0),
- OSSL_PARAM_size_t(OSSL_EXCHANGE_PARAM_KDF_UKM_LEN, NULL),
OSSL_PARAM_END
};
@@ -444,11 +443,8 @@ static int dh_get_ctx_params(void *vpdhctx, OSSL_PARAM params[])
return 0;
p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_UKM);
- if (p != NULL && !OSSL_PARAM_set_octet_ptr(p, pdhctx->kdf_ukm, 0))
- return 0;
-
- p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_UKM_LEN);
- if (p != NULL && !OSSL_PARAM_set_size_t(p, pdhctx->kdf_ukmlen))
+ if (p != NULL
+ && !OSSL_PARAM_set_octet_ptr(p, pdhctx->kdf_ukm, pdhctx->kdf_ukmlen))
return 0;
p = OSSL_PARAM_locate(params, OSSL_KDF_PARAM_CEK_ALG);
diff --git a/providers/implementations/exchange/ecdh_exch.c b/providers/implementations/exchange/ecdh_exch.c
index 0ea54ecc5f..5bc7a13cc7 100644
--- a/providers/implementations/exchange/ecdh_exch.c
+++ b/providers/implementations/exchange/ecdh_exch.c
@@ -356,11 +356,8 @@ int ecdh_get_ctx_params(void *vpecdhctx, OSSL_PARAM params[])
return 0;
p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_UKM);
- if (p != NULL && !OSSL_PARAM_set_octet_ptr(p, pectx->kdf_ukm, 0))
- return 0;
-
- p = OSSL_PARAM_locate(params, OSSL_EXCHANGE_PARAM_KDF_UKM_LEN);
- if (p != NULL && !OSSL_PARAM_set_size_t(p, pectx->kdf_ukmlen))
+ if (p != NULL &&
+ !OSSL_PARAM_set_octet_ptr(p, pectx->kdf_ukm, pectx->kdf_ukmlen))
return 0;
return 1;
@@ -373,7 +370,6 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
OSSL_PARAM_size_t(OSSL_EXCHANGE_PARAM_KDF_OUTLEN, NULL),
OSSL_PARAM_DEFN(OSSL_EXCHANGE_PARAM_KDF_UKM, OSSL_PARAM_OCTET_PTR,
NULL, 0),
- OSSL_PARAM_size_t(OSSL_EXCHANGE_PARAM_KDF_UKM_LEN, NULL),
OSSL_PARAM_END
};