diff options
author | tb <> | 2023-06-13 09:12:22 +0000 |
---|---|---|
committer | tb <> | 2023-06-13 09:12:22 +0000 |
commit | c83852c11b8675efa6930be4e17c9743d2cfda4d (patch) | |
tree | 68cbd584fbcb27b812b5a084b2a27e56cb81ab42 /src/lib/libcrypto/bn/bn_err.c | |
parent | 68db0cd7592a548f310f8037c0ba78583d91e3c9 (diff) | |
download | openbsd-c83852c11b8675efa6930be4e17c9743d2cfda4d.tar.gz openbsd-c83852c11b8675efa6930be4e17c9743d2cfda4d.tar.bz2 openbsd-c83852c11b8675efa6930be4e17c9743d2cfda4d.zip |
Add a BN_R_INVALID_ARGUMENT error code
One problem with OpenSSL error codes is that they tend to be too specific
(another problem is that they are extremely ugly). So add an EINVAL-style
error code. This will be used in an upcoming commit to disallow aliasing
of the 'return value' with the modulus in BN_mod_* functions and should
be applicable elsewhere, outside of this one narrow use case.
ok jsing
Diffstat (limited to 'src/lib/libcrypto/bn/bn_err.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_err.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_err.c b/src/lib/libcrypto/bn/bn_err.c index 592c509416..b861ea9374 100644 --- a/src/lib/libcrypto/bn/bn_err.c +++ b/src/lib/libcrypto/bn/bn_err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_err.c,v 1.15 2022/07/12 14:42:48 kn Exp $ */ | 1 | /* $OpenBSD: bn_err.c,v 1.16 2023/06/13 09:12:22 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -80,6 +80,7 @@ static ERR_STRING_DATA BN_str_reasons[]= { | |||
80 | {ERR_REASON(BN_R_ENCODING_ERROR) , "encoding error"}, | 80 | {ERR_REASON(BN_R_ENCODING_ERROR) , "encoding error"}, |
81 | {ERR_REASON(BN_R_EXPAND_ON_STATIC_BIGNUM_DATA), "expand on static bignum data"}, | 81 | {ERR_REASON(BN_R_EXPAND_ON_STATIC_BIGNUM_DATA), "expand on static bignum data"}, |
82 | {ERR_REASON(BN_R_INPUT_NOT_REDUCED) , "input not reduced"}, | 82 | {ERR_REASON(BN_R_INPUT_NOT_REDUCED) , "input not reduced"}, |
83 | {ERR_REASON(BN_R_INVALID_ARGUMENT) , "invalid argument"}, | ||
83 | {ERR_REASON(BN_R_INVALID_LENGTH) , "invalid length"}, | 84 | {ERR_REASON(BN_R_INVALID_LENGTH) , "invalid length"}, |
84 | {ERR_REASON(BN_R_INVALID_RANGE) , "invalid range"}, | 85 | {ERR_REASON(BN_R_INVALID_RANGE) , "invalid range"}, |
85 | {ERR_REASON(BN_R_NOT_A_SQUARE) , "not a square"}, | 86 | {ERR_REASON(BN_R_NOT_A_SQUARE) , "not a square"}, |