dsa_err.c revision 296465
138061Smsmith/* crypto/dsa/dsa_err.c */
238061Smsmith/* ====================================================================
338061Smsmith * Copyright (c) 1999-2007 The OpenSSL Project.  All rights reserved.
438061Smsmith *
538061Smsmith * Redistribution and use in source and binary forms, with or without
638061Smsmith * modification, are permitted provided that the following conditions
738061Smsmith * are met:
838061Smsmith *
938061Smsmith * 1. Redistributions of source code must retain the above copyright
1038061Smsmith *    notice, this list of conditions and the following disclaimer.
1138061Smsmith *
1238061Smsmith * 2. Redistributions in binary form must reproduce the above copyright
1338061Smsmith *    notice, this list of conditions and the following disclaimer in
1438061Smsmith *    the documentation and/or other materials provided with the
1538061Smsmith *    distribution.
1638061Smsmith *
1738061Smsmith * 3. All advertising materials mentioning features or use of this
1838061Smsmith *    software must display the following acknowledgment:
1938061Smsmith *    "This product includes software developed by the OpenSSL Project
2038061Smsmith *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
2138061Smsmith *
2238061Smsmith * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
2338061Smsmith *    endorse or promote products derived from this software without
2438061Smsmith *    prior written permission. For written permission, please contact
2538061Smsmith *    openssl-core@OpenSSL.org.
2638061Smsmith *
2750477Speter * 5. Products derived from this software may not be called "OpenSSL"
2838061Smsmith *    nor may "OpenSSL" appear in their names without prior written
2938061Smsmith *    permission of the OpenSSL Project.
3038061Smsmith *
3138061Smsmith * 6. Redistributions of any form whatsoever must retain the following
3238061Smsmith *    acknowledgment:
3338061Smsmith *    "This product includes software developed by the OpenSSL Project
3438061Smsmith *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
3538061Smsmith *
3638061Smsmith * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
3738061Smsmith * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3838061Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
3938061Smsmith * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
4038061Smsmith * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4138061Smsmith * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4238061Smsmith * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4338061Smsmith * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4438061Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4538061Smsmith * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
4638061Smsmith * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
4738061Smsmith * OF THE POSSIBILITY OF SUCH DAMAGE.
4838061Smsmith * ====================================================================
4938061Smsmith *
5038061Smsmith * This product includes cryptographic software written by Eric Young
5138061Smsmith * (eay@cryptsoft.com).  This product includes software written by Tim
5238061Smsmith * Hudson (tjh@cryptsoft.com).
5338061Smsmith *
5438061Smsmith */
5538061Smsmith
5638061Smsmith/*
5738061Smsmith * NOTE: this file was auto generated by the mkerr.pl script: any changes
5838061Smsmith * made to it will be overwritten when the script next updates this file,
5938061Smsmith * only reason strings will be preserved.
6038061Smsmith */
6138061Smsmith
6238061Smsmith#include <stdio.h>
6338061Smsmith#include <openssl/err.h>
6438061Smsmith#include <openssl/dsa.h>
6538061Smsmith
6638061Smsmith/* BEGIN ERROR CODES */
6738061Smsmith#ifndef OPENSSL_NO_ERR
6838061Smsmith
6938061Smsmith# define ERR_FUNC(func) ERR_PACK(ERR_LIB_DSA,func,0)
7038061Smsmith# define ERR_REASON(reason) ERR_PACK(ERR_LIB_DSA,0,reason)
7138061Smsmith
7238061Smsmithstatic ERR_STRING_DATA DSA_str_functs[] = {
7338061Smsmith    {ERR_FUNC(DSA_F_D2I_DSA_SIG), "d2i_DSA_SIG"},
7438061Smsmith    {ERR_FUNC(DSA_F_DSAPARAMS_PRINT), "DSAparams_print"},
7538061Smsmith    {ERR_FUNC(DSA_F_DSAPARAMS_PRINT_FP), "DSAparams_print_fp"},
7638061Smsmith    {ERR_FUNC(DSA_F_DSA_BUILTIN_KEYGEN), "DSA_BUILTIN_KEYGEN"},
7738061Smsmith    {ERR_FUNC(DSA_F_DSA_BUILTIN_PARAMGEN), "DSA_BUILTIN_PARAMGEN"},
7838061Smsmith    {ERR_FUNC(DSA_F_DSA_DO_SIGN), "DSA_do_sign"},
7938061Smsmith    {ERR_FUNC(DSA_F_DSA_DO_VERIFY), "DSA_do_verify"},
8038061Smsmith    {ERR_FUNC(DSA_F_DSA_GENERATE_PARAMETERS), "DSA_generate_parameters"},
8138061Smsmith    {ERR_FUNC(DSA_F_DSA_NEW_METHOD), "DSA_new_method"},
8238061Smsmith    {ERR_FUNC(DSA_F_DSA_PRINT), "DSA_print"},
8338061Smsmith    {ERR_FUNC(DSA_F_DSA_PRINT_FP), "DSA_print_fp"},
8438061Smsmith    {ERR_FUNC(DSA_F_DSA_SET_DEFAULT_METHOD), "DSA_set_default_method"},
8538061Smsmith    {ERR_FUNC(DSA_F_DSA_SET_METHOD), "DSA_set_method"},
8638061Smsmith    {ERR_FUNC(DSA_F_DSA_SIGN), "DSA_sign"},
8738061Smsmith    {ERR_FUNC(DSA_F_DSA_SIGN_SETUP), "DSA_sign_setup"},
8838061Smsmith    {ERR_FUNC(DSA_F_DSA_SIG_NEW), "DSA_SIG_new"},
8938061Smsmith    {ERR_FUNC(DSA_F_DSA_VERIFY), "DSA_verify"},
9038061Smsmith    {ERR_FUNC(DSA_F_I2D_DSA_SIG), "i2d_DSA_SIG"},
9138061Smsmith    {ERR_FUNC(DSA_F_SIG_CB), "SIG_CB"},
9238061Smsmith    {0, NULL}
9338061Smsmith};
9438061Smsmith
9538061Smsmithstatic ERR_STRING_DATA DSA_str_reasons[] = {
9648645Sdes    {ERR_REASON(DSA_R_BAD_Q_VALUE), "bad q value"},
9748645Sdes    {ERR_REASON(DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),
9838061Smsmith     "data too large for key size"},
9938061Smsmith    {ERR_REASON(DSA_R_KEY_SIZE_TOO_SMALL), "key size too small"},
10038061Smsmith    {ERR_REASON(DSA_R_MISSING_PARAMETERS), "missing parameters"},
10138061Smsmith    {ERR_REASON(DSA_R_MODULUS_TOO_LARGE), "modulus too large"},
10238061Smsmith    {ERR_REASON(DSA_R_NON_FIPS_METHOD), "non fips method"},
10343109Snsouch    {ERR_REASON(DSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE),
10443109Snsouch     "operation not allowed in fips mode"},
10538061Smsmith    {0, NULL}
10638061Smsmith};
10738061Smsmith
10838061Smsmith#endif
10938061Smsmith
11038061Smsmithvoid ERR_load_DSA_strings(void)
11138061Smsmith{
11238061Smsmith#ifndef OPENSSL_NO_ERR
11338061Smsmith
11438061Smsmith    if (ERR_func_error_string(DSA_str_functs[0].error) == NULL) {
11538061Smsmith        ERR_load_strings(0, DSA_str_functs);
11638061Smsmith        ERR_load_strings(0, DSA_str_reasons);
11738061Smsmith    }
11838061Smsmith#endif
11938061Smsmith}
12038061Smsmith