diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_err.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_err.c | 92 |
1 files changed, 42 insertions, 50 deletions
diff --git a/src/lib/libcrypto/bn/bn_err.c b/src/lib/libcrypto/bn/bn_err.c index 5dfac00c88..fb84ee96d8 100644 --- a/src/lib/libcrypto/bn/bn_err.c +++ b/src/lib/libcrypto/bn/bn_err.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* crypto/bn/bn_err.c */ | 1 | /* crypto/bn/bn_err.c */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
@@ -64,60 +64,52 @@ | |||
64 | 64 | ||
65 | /* BEGIN ERROR CODES */ | 65 | /* BEGIN ERROR CODES */ |
66 | #ifndef OPENSSL_NO_ERR | 66 | #ifndef OPENSSL_NO_ERR |
67 | |||
68 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_BN,func,0) | ||
69 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_BN,0,reason) | ||
70 | |||
71 | static ERR_STRING_DATA BN_str_functs[]= | 67 | static ERR_STRING_DATA BN_str_functs[]= |
72 | { | 68 | { |
73 | {ERR_FUNC(BN_F_BN_BLINDING_CONVERT), "BN_BLINDING_convert"}, | 69 | {ERR_PACK(0,BN_F_BN_BLINDING_CONVERT,0), "BN_BLINDING_convert"}, |
74 | {ERR_FUNC(BN_F_BN_BLINDING_INVERT), "BN_BLINDING_invert"}, | 70 | {ERR_PACK(0,BN_F_BN_BLINDING_INVERT,0), "BN_BLINDING_invert"}, |
75 | {ERR_FUNC(BN_F_BN_BLINDING_NEW), "BN_BLINDING_new"}, | 71 | {ERR_PACK(0,BN_F_BN_BLINDING_NEW,0), "BN_BLINDING_new"}, |
76 | {ERR_FUNC(BN_F_BN_BLINDING_UPDATE), "BN_BLINDING_update"}, | 72 | {ERR_PACK(0,BN_F_BN_BLINDING_UPDATE,0), "BN_BLINDING_update"}, |
77 | {ERR_FUNC(BN_F_BN_BN2DEC), "BN_bn2dec"}, | 73 | {ERR_PACK(0,BN_F_BN_BN2DEC,0), "BN_bn2dec"}, |
78 | {ERR_FUNC(BN_F_BN_BN2HEX), "BN_bn2hex"}, | 74 | {ERR_PACK(0,BN_F_BN_BN2HEX,0), "BN_bn2hex"}, |
79 | {ERR_FUNC(BN_F_BN_CTX_GET), "BN_CTX_get"}, | 75 | {ERR_PACK(0,BN_F_BN_CTX_GET,0), "BN_CTX_get"}, |
80 | {ERR_FUNC(BN_F_BN_CTX_NEW), "BN_CTX_new"}, | 76 | {ERR_PACK(0,BN_F_BN_CTX_NEW,0), "BN_CTX_new"}, |
81 | {ERR_FUNC(BN_F_BN_DIV), "BN_div"}, | 77 | {ERR_PACK(0,BN_F_BN_DIV,0), "BN_div"}, |
82 | {ERR_FUNC(BN_F_BN_EXP), "BN_exp"}, | 78 | {ERR_PACK(0,BN_F_BN_EXPAND2,0), "bn_expand2"}, |
83 | {ERR_FUNC(BN_F_BN_EXPAND2), "bn_expand2"}, | 79 | {ERR_PACK(0,BN_F_BN_EXPAND_INTERNAL,0), "BN_EXPAND_INTERNAL"}, |
84 | {ERR_FUNC(BN_F_BN_EXPAND_INTERNAL), "BN_EXPAND_INTERNAL"}, | 80 | {ERR_PACK(0,BN_F_BN_MOD_EXP2_MONT,0), "BN_mod_exp2_mont"}, |
85 | {ERR_FUNC(BN_F_BN_MOD_EXP2_MONT), "BN_mod_exp2_mont"}, | 81 | {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT,0), "BN_mod_exp_mont"}, |
86 | {ERR_FUNC(BN_F_BN_MOD_EXP_MONT), "BN_mod_exp_mont"}, | 82 | {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT_WORD,0), "BN_mod_exp_mont_word"}, |
87 | {ERR_FUNC(BN_F_BN_MOD_EXP_MONT_CONSTTIME), "BN_mod_exp_mont_consttime"}, | 83 | {ERR_PACK(0,BN_F_BN_MOD_INVERSE,0), "BN_mod_inverse"}, |
88 | {ERR_FUNC(BN_F_BN_MOD_EXP_MONT_WORD), "BN_mod_exp_mont_word"}, | 84 | {ERR_PACK(0,BN_F_BN_MOD_LSHIFT_QUICK,0), "BN_mod_lshift_quick"}, |
89 | {ERR_FUNC(BN_F_BN_MOD_EXP_RECP), "BN_mod_exp_recp"}, | 85 | {ERR_PACK(0,BN_F_BN_MOD_MUL_RECIPROCAL,0), "BN_mod_mul_reciprocal"}, |
90 | {ERR_FUNC(BN_F_BN_MOD_EXP_SIMPLE), "BN_mod_exp_simple"}, | 86 | {ERR_PACK(0,BN_F_BN_MOD_SQRT,0), "BN_mod_sqrt"}, |
91 | {ERR_FUNC(BN_F_BN_MOD_INVERSE), "BN_mod_inverse"}, | 87 | {ERR_PACK(0,BN_F_BN_MPI2BN,0), "BN_mpi2bn"}, |
92 | {ERR_FUNC(BN_F_BN_MOD_LSHIFT_QUICK), "BN_mod_lshift_quick"}, | 88 | {ERR_PACK(0,BN_F_BN_NEW,0), "BN_new"}, |
93 | {ERR_FUNC(BN_F_BN_MOD_MUL_RECIPROCAL), "BN_mod_mul_reciprocal"}, | 89 | {ERR_PACK(0,BN_F_BN_RAND,0), "BN_rand"}, |
94 | {ERR_FUNC(BN_F_BN_MOD_SQRT), "BN_mod_sqrt"}, | 90 | {ERR_PACK(0,BN_F_BN_RAND_RANGE,0), "BN_rand_range"}, |
95 | {ERR_FUNC(BN_F_BN_MPI2BN), "BN_mpi2bn"}, | 91 | {ERR_PACK(0,BN_F_BN_USUB,0), "BN_usub"}, |
96 | {ERR_FUNC(BN_F_BN_NEW), "BN_new"}, | ||
97 | {ERR_FUNC(BN_F_BN_RAND), "BN_rand"}, | ||
98 | {ERR_FUNC(BN_F_BN_RAND_RANGE), "BN_rand_range"}, | ||
99 | {ERR_FUNC(BN_F_BN_USUB), "BN_usub"}, | ||
100 | {0,NULL} | 92 | {0,NULL} |
101 | }; | 93 | }; |
102 | 94 | ||
103 | static ERR_STRING_DATA BN_str_reasons[]= | 95 | static ERR_STRING_DATA BN_str_reasons[]= |
104 | { | 96 | { |
105 | {ERR_REASON(BN_R_ARG2_LT_ARG3) ,"arg2 lt arg3"}, | 97 | {BN_R_ARG2_LT_ARG3 ,"arg2 lt arg3"}, |
106 | {ERR_REASON(BN_R_BAD_RECIPROCAL) ,"bad reciprocal"}, | 98 | {BN_R_BAD_RECIPROCAL ,"bad reciprocal"}, |
107 | {ERR_REASON(BN_R_BIGNUM_TOO_LONG) ,"bignum too long"}, | 99 | {BN_R_BIGNUM_TOO_LONG ,"bignum too long"}, |
108 | {ERR_REASON(BN_R_CALLED_WITH_EVEN_MODULUS),"called with even modulus"}, | 100 | {BN_R_CALLED_WITH_EVEN_MODULUS ,"called with even modulus"}, |
109 | {ERR_REASON(BN_R_DIV_BY_ZERO) ,"div by zero"}, | 101 | {BN_R_DIV_BY_ZERO ,"div by zero"}, |
110 | {ERR_REASON(BN_R_ENCODING_ERROR) ,"encoding error"}, | 102 | {BN_R_ENCODING_ERROR ,"encoding error"}, |
111 | {ERR_REASON(BN_R_EXPAND_ON_STATIC_BIGNUM_DATA),"expand on static bignum data"}, | 103 | {BN_R_EXPAND_ON_STATIC_BIGNUM_DATA ,"expand on static bignum data"}, |
112 | {ERR_REASON(BN_R_INPUT_NOT_REDUCED) ,"input not reduced"}, | 104 | {BN_R_INPUT_NOT_REDUCED ,"input not reduced"}, |
113 | {ERR_REASON(BN_R_INVALID_LENGTH) ,"invalid length"}, | 105 | {BN_R_INVALID_LENGTH ,"invalid length"}, |
114 | {ERR_REASON(BN_R_INVALID_RANGE) ,"invalid range"}, | 106 | {BN_R_INVALID_RANGE ,"invalid range"}, |
115 | {ERR_REASON(BN_R_NOT_A_SQUARE) ,"not a square"}, | 107 | {BN_R_NOT_A_SQUARE ,"not a square"}, |
116 | {ERR_REASON(BN_R_NOT_INITIALIZED) ,"not initialized"}, | 108 | {BN_R_NOT_INITIALIZED ,"not initialized"}, |
117 | {ERR_REASON(BN_R_NO_INVERSE) ,"no inverse"}, | 109 | {BN_R_NO_INVERSE ,"no inverse"}, |
118 | {ERR_REASON(BN_R_P_IS_NOT_PRIME) ,"p is not prime"}, | 110 | {BN_R_P_IS_NOT_PRIME ,"p is not prime"}, |
119 | {ERR_REASON(BN_R_TOO_MANY_ITERATIONS) ,"too many iterations"}, | 111 | {BN_R_TOO_MANY_ITERATIONS ,"too many iterations"}, |
120 | {ERR_REASON(BN_R_TOO_MANY_TEMPORARY_VARIABLES),"too many temporary variables"}, | 112 | {BN_R_TOO_MANY_TEMPORARY_VARIABLES ,"too many temporary variables"}, |
121 | {0,NULL} | 113 | {0,NULL} |
122 | }; | 114 | }; |
123 | 115 | ||
@@ -131,8 +123,8 @@ void ERR_load_BN_strings(void) | |||
131 | { | 123 | { |
132 | init=0; | 124 | init=0; |
133 | #ifndef OPENSSL_NO_ERR | 125 | #ifndef OPENSSL_NO_ERR |
134 | ERR_load_strings(0,BN_str_functs); | 126 | ERR_load_strings(ERR_LIB_BN,BN_str_functs); |
135 | ERR_load_strings(0,BN_str_reasons); | 127 | ERR_load_strings(ERR_LIB_BN,BN_str_reasons); |
136 | #endif | 128 | #endif |
137 | 129 | ||
138 | } | 130 | } |