ecs_err.c revision 392aa7cc7d2b122614c5393c3e357da07fd07af3
12d1be87ee40a4a0241d94448173879d9df2bc5b3Dan Gohman/* crypto/ecdsa/ecs_err.c */
2fd93908ae8b9684fe71c239e3c6cfe13ff6a2663Misha Brukman/* ====================================================================
3eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman * Copyright (c) 1999-2011 The OpenSSL Project.  All rights reserved.
4eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman *
54ee451de366474b9c228b4e5fa573795a715216dChris Lattner * Redistribution and use in source and binary forms, with or without
64ee451de366474b9c228b4e5fa573795a715216dChris Lattner * modification, are permitted provided that the following conditions
7fd93908ae8b9684fe71c239e3c6cfe13ff6a2663Misha Brukman * are met:
8eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman *
9eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman * 1. Redistributions of source code must retain the above copyright
10cec8f9da54d3017e27c46ced38b859136655c198Dan Gohman *    notice, this list of conditions and the following disclaimer.
11cec8f9da54d3017e27c46ced38b859136655c198Dan Gohman *
12cec8f9da54d3017e27c46ced38b859136655c198Dan Gohman * 2. Redistributions in binary form must reproduce the above copyright
13cec8f9da54d3017e27c46ced38b859136655c198Dan Gohman *    notice, this list of conditions and the following disclaimer in
14eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman *    the documentation and/or other materials provided with the
15cec8f9da54d3017e27c46ced38b859136655c198Dan Gohman *    distribution.
16cec8f9da54d3017e27c46ced38b859136655c198Dan Gohman *
17cec8f9da54d3017e27c46ced38b859136655c198Dan Gohman * 3. All advertising materials mentioning features or use of this
18cec8f9da54d3017e27c46ced38b859136655c198Dan Gohman *    software must display the following acknowledgment:
19eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman *    "This product includes software developed by the OpenSSL Project
20572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
21572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *
22572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    endorse or promote products derived from this software without
24572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    prior written permission. For written permission, please contact
25572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    openssl-core@OpenSSL.org.
26572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *
27572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * 5. Products derived from this software may not be called "OpenSSL"
28572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    nor may "OpenSSL" appear in their names without prior written
29572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    permission of the OpenSSL Project.
30572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *
31572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * 6. Redistributions of any form whatsoever must retain the following
32572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    acknowledgment:
33572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    "This product includes software developed by the OpenSSL Project
34572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
35572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *
36572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
37572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
40572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
45572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
47572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * OF THE POSSIBILITY OF SUCH DAMAGE.
48572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * ====================================================================
49572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *
50572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * This product includes cryptographic software written by Eric Young
51572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * (eay@cryptsoft.com).  This product includes software written by Tim
52572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman * Hudson (tjh@cryptsoft.com).
53572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman *
54eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman */
55eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman
56be3e5212e23edc9210f774fac18d801de252e906Chris Lattner/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman * made to it will be overwritten when the script next updates this file,
58eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman * only reason strings will be preserved.
59eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman */
60e5b01bea7b9b7dce7c24484d2d915b0c118d4d07Dan Gohman
612f3c9b7562bcdc1795b2bd0ca28b283a8e972826Jeff Cohen#include <stdio.h>
6281db61a2e6d3c95a2738c3559a108e05e9d7a05aDan Gohman#include <openssl/err.h>
63572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman#include <openssl/ecdsa.h>
640f54dcbf07c69e41ecaa6b4fbf0d94956d8e9ff5Devang Patel
65169974856781a1ce27af9ce6220c390b20c9e6ddNate Begeman/* BEGIN ERROR CODES */
66e0391beda88c6c441ce1aadbe223d6c0784061a2Chris Lattner#ifndef OPENSSL_NO_ERR
67eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman
68572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDSA,func,0)
69572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman#define ERR_REASON(reason) ERR_PACK(ERR_LIB_ECDSA,0,reason)
70572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman
71169974856781a1ce27af9ce6220c390b20c9e6ddNate Begemanstatic ERR_STRING_DATA ECDSA_str_functs[]=
72afc36a9520971832dfbebc0333593bf5d3098296Dan Gohman	{
73460f656475738d1a95a6be95346908ce1597df25Daniel Dunbar{ERR_FUNC(ECDSA_F_ECDSA_CHECK),	"ECDSA_CHECK"},
74d277f2c66914aecb619c12855f6afae4c7ef883bEvan Cheng{ERR_FUNC(ECDSA_F_ECDSA_DATA_NEW_METHOD),	"ECDSA_DATA_NEW_METHOD"},
75cfb1d4235fe3291028341e6acf4139723b4749e3Jeff Cohen{ERR_FUNC(ECDSA_F_ECDSA_DO_SIGN),	"ECDSA_do_sign"},
76eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman{ERR_FUNC(ECDSA_F_ECDSA_DO_VERIFY),	"ECDSA_do_verify"},
77eaa13851a7fe604363577350c5cf65c257c4d41aNate Begeman{ERR_FUNC(ECDSA_F_ECDSA_SIGN_SETUP),	"ECDSA_sign_setup"},
78572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{0,NULL}
79572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman	};
80572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman
81572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohmanstatic ERR_STRING_DATA ECDSA_str_reasons[]=
82572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman	{
83572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{ERR_REASON(ECDSA_R_BAD_SIGNATURE)       ,"bad signature"},
84572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{ERR_REASON(ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),"data too large for key size"},
85572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{ERR_REASON(ECDSA_R_ERR_EC_LIB)          ,"err ec lib"},
86572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{ERR_REASON(ECDSA_R_MISSING_PARAMETERS)  ,"missing parameters"},
87572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{ERR_REASON(ECDSA_R_NEED_NEW_SETUP_VALUES),"need new setup values"},
88572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{ERR_REASON(ECDSA_R_NON_FIPS_METHOD)     ,"non fips method"},
89572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{ERR_REASON(ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED),"random number generation failed"},
90572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{ERR_REASON(ECDSA_R_SIGNATURE_MALLOC_FAILED),"signature malloc failed"},
91572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman{0,NULL}
92572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman	};
93572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman
94572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman#endif
95572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman
96572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohmanvoid ERR_load_ECDSA_strings(void)
97572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman	{
98dc42f48ea90132509e678028e7dbab5544ef0794Dale Johannesen#ifndef OPENSSL_NO_ERR
99572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman
100572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman	if (ERR_func_error_string(ECDSA_str_functs[0].error) == NULL)
101572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman		{
102dc42f48ea90132509e678028e7dbab5544ef0794Dale Johannesen		ERR_load_strings(0,ECDSA_str_functs);
1037979b72febb73f7bb1d1ed095a68f210822b2e7cDan Gohman		ERR_load_strings(0,ECDSA_str_reasons);
1047979b72febb73f7bb1d1ed095a68f210822b2e7cDan Gohman		}
105572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman#endif
106572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman	}
107572645cf84060c0fc25cb91d38cb9079918b3a88Dan Gohman