summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_err.c
diff options
context:
space:
mode:
authortb <>2020-04-27 19:31:02 +0000
committertb <>2020-04-27 19:31:02 +0000
commit30a0f6e6eb2e9f8944e28e141ddfa6f640033c2c (patch)
tree690e769e57ab9ebb2919a9465adde8c1621ffb33 /src/lib/libcrypto/evp/evp_err.c
parent241295e8155a67d455196dd25c2c9728ad04ca61 (diff)
downloadopenbsd-30a0f6e6eb2e9f8944e28e141ddfa6f640033c2c.tar.gz
openbsd-30a0f6e6eb2e9f8944e28e141ddfa6f640033c2c.tar.bz2
openbsd-30a0f6e6eb2e9f8944e28e141ddfa6f640033c2c.zip
Disallow the use of zero length IVs in AES-GCM via
EVP_AEAD_CTX_{open,seal}, as this leaks the authentication key. Issue reported and fix tested by Guido Vranken. ok beck, jsing This commit adds a constant to a public header despite library lock, as discussed with deraadt and sthen.
Diffstat (limited to 'src/lib/libcrypto/evp/evp_err.c')
-rw-r--r--src/lib/libcrypto/evp/evp_err.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp_err.c b/src/lib/libcrypto/evp/evp_err.c
index 89f980b796..2494cf5790 100644
--- a/src/lib/libcrypto/evp/evp_err.c
+++ b/src/lib/libcrypto/evp/evp_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_err.c,v 1.25 2019/03/18 05:34:29 tb Exp $ */ 1/* $OpenBSD: evp_err.c,v 1.26 2020/04/27 19:31:02 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -111,6 +111,7 @@ static ERR_STRING_DATA EVP_str_reasons[] = {
111 {ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED) , "input not initialized"}, 111 {ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED) , "input not initialized"},
112 {ERR_REASON(EVP_R_INVALID_DIGEST) , "invalid digest"}, 112 {ERR_REASON(EVP_R_INVALID_DIGEST) , "invalid digest"},
113 {ERR_REASON(EVP_R_INVALID_FIPS_MODE) , "invalid fips mode"}, 113 {ERR_REASON(EVP_R_INVALID_FIPS_MODE) , "invalid fips mode"},
114 {ERR_REASON(EVP_R_INVALID_IV_LENGTH) , "invalid iv length"},
114 {ERR_REASON(EVP_R_INVALID_KEY_LENGTH) , "invalid key length"}, 115 {ERR_REASON(EVP_R_INVALID_KEY_LENGTH) , "invalid key length"},
115 {ERR_REASON(EVP_R_INVALID_OPERATION) , "invalid operation"}, 116 {ERR_REASON(EVP_R_INVALID_OPERATION) , "invalid operation"},
116 {ERR_REASON(EVP_R_IV_TOO_LARGE) , "iv too large"}, 117 {ERR_REASON(EVP_R_IV_TOO_LARGE) , "iv too large"},