summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authortrinity-1686a <trinity@deuxfleurs.fr>2024-04-15 11:13:14 +0200
committerTomas Mraz <tomas@openssl.org>2024-04-17 08:53:34 +0200
commit14de8daee239ca5bd2d72fe7596e1f272d012c15 (patch)
treebd3308627e743402ed35e02ba12af4e7b84af3c1 /crypto
parent4cd696912d0cd9175eb7bec9cccc117e554207e2 (diff)
Handle empty param in EVP_PKEY_CTX_add1_hkdf_info
Fixes #24130 The regression was introduced in PR #23456. Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24141) (cherry picked from commit 299996fb1fcd76eeadfd547958de2a1b822f37f5)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/pmeth_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index d0eeaf7137..bce1ebc84e 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -1053,6 +1053,8 @@ static int evp_pkey_ctx_add1_octet_string(EVP_PKEY_CTX *ctx, int fallback,
if (datalen < 0) {
ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
return 0;
+ } else if (datalen == 0) {
+ return 1;
}
/* Get the original value length */