bn_err.c revision 65c4736d9c0ebc6d9b1d991593b55566909da9cd
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff/* crypto/bn/bn_err.c */
ca41b452ede6feaa9d8739ec3cae19389a7b0d03Bob Halley/* ====================================================================
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff *
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * Redistribution and use in source and binary forms, with or without
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * modification, are permitted provided that the following conditions
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * are met:
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff *
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * 1. Redistributions of source code must retain the above copyright
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * notice, this list of conditions and the following disclaimer.
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff *
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * 2. Redistributions in binary form must reproduce the above copyright
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * notice, this list of conditions and the following disclaimer in
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * the documentation and/or other materials provided with the
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * distribution.
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff *
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * 3. All advertising materials mentioning features or use of this
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * software must display the following acknowledgment:
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * "This product includes software developed by the OpenSSL Project
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff *
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * endorse or promote products derived from this software without
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * prior written permission. For written permission, please contact
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * openssl-core@OpenSSL.org.
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff *
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff * 5. Products derived from this software may not be called "OpenSSL"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff * nor may "OpenSSL" appear in their names without prior written
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff * permission of the OpenSSL Project.
7df0472d8a76c83d2137bd9549414a30787d58cfBrian Wellington *
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff * 6. Redistributions of any form whatsoever must retain the following
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * acknowledgment:
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * "This product includes software developed by the OpenSSL Project
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff *
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * OF THE POSSIBILITY OF SUCH DAMAGE.
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * ====================================================================
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff *
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * This product includes cryptographic software written by Eric Young
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * (eay@cryptsoft.com). This product includes software written by Tim
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * Hudson (tjh@cryptsoft.com).
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff *
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff */
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff/* NOTE: this file was auto generated by the mkerr.pl script: any changes
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff * made to it will be overwritten when the script next updates this file.
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff */
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff#include <stdio.h>
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff#include <openssl/err.h>
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff#include <openssl/bn.h>
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff/* BEGIN ERROR CODES */
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff#ifndef NO_ERR
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graffstatic ERR_STRING_DATA BN_str_functs[]=
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff {
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_BLINDING_CONVERT,0), "BN_BLINDING_convert"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_BLINDING_INVERT,0), "BN_BLINDING_invert"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_BLINDING_NEW,0), "BN_BLINDING_new"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_BLINDING_UPDATE,0), "BN_BLINDING_update"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_BN2DEC,0), "BN_bn2dec"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_BN2HEX,0), "BN_bn2hex"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_CTX_NEW,0), "BN_CTX_new"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_DIV,0), "BN_div"},
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff{ERR_PACK(0,BN_F_BN_EXPAND2,0), "bn_expand2"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_MOD_EXP_MONT,0), "BN_mod_exp_mont"},
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff{ERR_PACK(0,BN_F_BN_MOD_INVERSE,0), "BN_mod_inverse"},
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff{ERR_PACK(0,BN_F_BN_MOD_MUL_RECIPROCAL,0), "BN_mod_mul_reciprocal"},
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff{ERR_PACK(0,BN_F_BN_MPI2BN,0), "BN_mpi2bn"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_NEW,0), "BN_new"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_RAND,0), "BN_rand"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{ERR_PACK(0,BN_F_BN_USUB,0), "BN_usub"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{0,NULL}
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff };
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graffstatic ERR_STRING_DATA BN_str_reasons[]=
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff {
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{BN_R_ARG2_LT_ARG3 ,"arg2 lt arg3"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{BN_R_BAD_RECIPROCAL ,"bad reciprocal"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{BN_R_CALLED_WITH_EVEN_MODULUS ,"called with even modulus"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{BN_R_DIV_BY_ZERO ,"div by zero"},
62e4837585f2d48ce9ef3ad6880d8fb75a578e58Andreas Gustafsson{BN_R_ENCODING_ERROR ,"encoding error"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{BN_R_EXPAND_ON_STATIC_BIGNUM_DATA ,"expand on static bignum data"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{BN_R_INVALID_LENGTH ,"invalid length"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{BN_R_NOT_INITIALIZED ,"not initialized"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{BN_R_NO_INVERSE ,"no inverse"},
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff{0,NULL}
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff };
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff#endif
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graffvoid ERR_load_BN_strings(void)
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff {
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff static int init=1;
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff if (init)
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff {
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff init=0;
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff#ifndef NO_ERR
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff ERR_load_strings(ERR_LIB_BN,BN_str_functs);
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff ERR_load_strings(ERR_LIB_BN,BN_str_reasons);
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff#endif
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff }
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff }
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff