summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn.h
diff options
context:
space:
mode:
authortb <>2023-06-13 09:12:22 +0000
committertb <>2023-06-13 09:12:22 +0000
commitc83852c11b8675efa6930be4e17c9743d2cfda4d (patch)
tree68cbd584fbcb27b812b5a084b2a27e56cb81ab42 /src/lib/libcrypto/bn/bn.h
parent68db0cd7592a548f310f8037c0ba78583d91e3c9 (diff)
downloadopenbsd-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.h')
-rw-r--r--src/lib/libcrypto/bn/bn.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index 386f8dff8d..7dc138d170 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn.h,v 1.71 2023/04/27 06:48:47 tb Exp $ */ 1/* $OpenBSD: bn.h,v 1.72 2023/06/13 09:12:22 tb Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -547,6 +547,7 @@ void ERR_load_BN_strings(void);
547#define BN_R_ENCODING_ERROR 104 547#define BN_R_ENCODING_ERROR 104
548#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105 548#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105
549#define BN_R_INPUT_NOT_REDUCED 110 549#define BN_R_INPUT_NOT_REDUCED 110
550#define BN_R_INVALID_ARGUMENT 118
550#define BN_R_INVALID_LENGTH 106 551#define BN_R_INVALID_LENGTH 106
551#define BN_R_INVALID_RANGE 115 552#define BN_R_INVALID_RANGE 115
552#define BN_R_NOT_A_SQUARE 111 553#define BN_R_NOT_A_SQUARE 111