More error handling to HKDF and one more case in TLS1-PRF
authorJohannes Bauer <joe@johannes-bauer.com>
Sat, 22 Jul 2017 15:43:05 +0000 (17:43 +0200)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 3 Aug 2017 00:07:52 +0000 (01:07 +0100)
commita24a5b8cc4103ddd69f21c91c7d7372abc270157
treeb2c5c51e26c9750efd6578624d4d43f4d603431b
parente65f650922f5aa9b8970a5ff935938ec46281c1a
More error handling to HKDF and one more case in TLS1-PRF

HKDF now handles an invalid digest like TLS1-PRF does (i.e., returns
KDF_R_INVALID_DIGEST if the passed digest is not known). Both KDFs now
set the error code KDF_R_UNKNOWN_PARAMETER_TYPE if a type was passed
that is not recognized. This will have the effect of improving debugging
output in case a user uses "openssl pkeyutl -kdf ..." in a wrong way and
result in an actual error code (instead of just "failure" and an empty
error stack).

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Stephen Henson <steve@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3989)
crypto/err/openssl.txt
crypto/kdf/hkdf.c
crypto/kdf/kdf_err.c
crypto/kdf/tls1_prf.c
include/openssl/kdferr.h