diff options
author | Richard Levitte <levitte@openssl.org> | 2021-01-24 20:37:09 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-01-26 15:51:50 +0100 |
commit | ba0a6d1deb20d81bbf89b365c5c73879cbe0fae7 (patch) | |
tree | f7eb202d844136c8f427c3eed9f5bc92d6be755d /crypto/evp/ec_ctrl.c | |
parent | 7b0f64b121860be91506906a2dc024e352b3d216 (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 'crypto/evp/ec_ctrl.c')
-rw-r--r-- | crypto/evp/ec_ctrl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/evp/ec_ctrl.c b/crypto/evp/ec_ctrl.c index 5bb078639c..c772a5820c 100644 --- a/crypto/evp/ec_ctrl.c +++ b/crypto/evp/ec_ctrl.c @@ -387,7 +387,7 @@ int EVP_PKEY_CTX_get0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **pukm) { size_t ukmlen; int ret; - OSSL_PARAM params[3], *p = params; + OSSL_PARAM params[2], *p = params; ret = evp_pkey_ctx_getset_ecdh_param_checks(ctx); if (ret != 1) @@ -402,8 +402,6 @@ int EVP_PKEY_CTX_get0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **pukm) *p++ = OSSL_PARAM_construct_octet_ptr(OSSL_EXCHANGE_PARAM_KDF_UKM, (void **)pukm, 0); - *p++ = OSSL_PARAM_construct_size_t(OSSL_EXCHANGE_PARAM_KDF_UKM_LEN, - &ukmlen); *p++ = OSSL_PARAM_construct_end(); ret = evp_pkey_ctx_get_params_strict(ctx, params); @@ -415,6 +413,7 @@ int EVP_PKEY_CTX_get0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **pukm) return -1; } + ukmlen = params[0].return_size; if (ukmlen > INT_MAX) return -1; |