SSKDF with KMAC should return SIZE_MAX when EVP_KDF_CTX_get_kdf_size()
authorslontis <shane.lontis@oracle.com>
Tue, 20 Dec 2022 03:44:18 +0000 (13:44 +1000)
committerTomas Mraz <tomas@openssl.org>
Thu, 12 Jan 2023 11:14:15 +0000 (12:14 +0100)
commitc6fc9f75814a2fdc67d1bd7442402af5bfe196c0
tree4daf7e01f2828bb485ed942a62bdad85e87e27a9
parent6828d87b93f32565a8d6f895282dad5b2bd9168c
SSKDF with KMAC should return SIZE_MAX when EVP_KDF_CTX_get_kdf_size()
is used.

Fixes #19934

The existing code was looking for the digest size, and then returned
zero.

The example code in EVP_KDF-SS.pod has been corrected to not use a
digest.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19935)

(cherry picked from commit e8add4d379075a6daef2591edd830297d469b9f4)
doc/man7/EVP_KDF-SS.pod
providers/implementations/kdfs/sskdf.c
test/evp_kdf_test.c