summaryrefslogtreecommitdiffstats
path: root/crypto/kdf/kdf_err.c
diff options
context:
space:
mode:
authorJohannes Bauer <joe@johannes-bauer.com>2017-07-22 00:11:39 +0200
committerDr. Stephen Henson <steve@openssl.org>2017-08-03 01:07:52 +0100
commite65f650922f5aa9b8970a5ff935938ec46281c1a (patch)
treef402cd41343a37f51423a4c71a662ae5291fac85 /crypto/kdf/kdf_err.c
parentd9ca12cbf6287aee7d86579f4c03be1155696c9f (diff)
Set error when HKDF used without parameters
Introduce KDF_F_PKEY_HKDF_DERIVE and return the KDF_R_MISSING_PARAMETER error code when required parameters have not been set. This will make "openssl pkeyutl -kdf HKDF" return a meaningful error message instead of simply "Public Key operation error". Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Stephen Henson <steve@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3989)
Diffstat (limited to 'crypto/kdf/kdf_err.c')
-rw-r--r--crypto/kdf/kdf_err.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/kdf/kdf_err.c b/crypto/kdf/kdf_err.c
index 5706d2d90b..f6193b2458 100644
--- a/crypto/kdf/kdf_err.c
+++ b/crypto/kdf/kdf_err.c
@@ -14,6 +14,7 @@
#ifndef OPENSSL_NO_ERR
static const ERR_STRING_DATA KDF_str_functs[] = {
+ {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_DERIVE, 0), "pkey_hkdf_derive"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_TLS1_PRF_CTRL_STR, 0),
"pkey_tls1_prf_ctrl_str"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_TLS1_PRF_DERIVE, 0),