ech_err.c revision 225736
1238722Skargl/* crypto/ecdh/ech_err.c */
2238722Skargl/* ====================================================================
3238722Skargl * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
4238722Skargl *
5238722Skargl * Redistribution and use in source and binary forms, with or without
6238722Skargl * modification, are permitted provided that the following conditions
7238722Skargl * are met:
8238722Skargl *
9238722Skargl * 1. Redistributions of source code must retain the above copyright
10238722Skargl *    notice, this list of conditions and the following disclaimer.
11238722Skargl *
12238722Skargl * 2. Redistributions in binary form must reproduce the above copyright
13238722Skargl *    notice, this list of conditions and the following disclaimer in
14238722Skargl *    the documentation and/or other materials provided with the
15238722Skargl *    distribution.
16238722Skargl *
17238722Skargl * 3. All advertising materials mentioning features or use of this
18238722Skargl *    software must display the following acknowledgment:
19238722Skargl *    "This product includes software developed by the OpenSSL Project
20238722Skargl *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
21238722Skargl *
22238722Skargl * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23238722Skargl *    endorse or promote products derived from this software without
24238722Skargl *    prior written permission. For written permission, please contact
25238722Skargl *    openssl-core@OpenSSL.org.
26238722Skargl *
27238722Skargl * 5. Products derived from this software may not be called "OpenSSL"
28238722Skargl *    nor may "OpenSSL" appear in their names without prior written
29238722Skargl *    permission of the OpenSSL Project.
30238722Skargl *
31238722Skargl * 6. Redistributions of any form whatsoever must retain the following
32238783Skargl *    acknowledgment:
33238722Skargl *    "This product includes software developed by the OpenSSL Project
34238722Skargl *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
35238722Skargl *
36238722Skargl * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
37238722Skargl * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38238722Skargl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39238722Skargl * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
40238722Skargl * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41238722Skargl * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42238722Skargl * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43238722Skargl * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44238722Skargl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
45238722Skargl * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46238722Skargl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
47238722Skargl * OF THE POSSIBILITY OF SUCH DAMAGE.
48238722Skargl * ====================================================================
49238722Skargl *
50238722Skargl * This product includes cryptographic software written by Eric Young
51238722Skargl * (eay@cryptsoft.com).  This product includes software written by Tim
52238722Skargl * Hudson (tjh@cryptsoft.com).
53238722Skargl *
54238722Skargl */
55238722Skargl
56238722Skargl/* NOTE: this file was auto generated by the mkerr.pl script: any changes
57238722Skargl * made to it will be overwritten when the script next updates this file,
58238722Skargl * only reason strings will be preserved.
59238722Skargl */
60238722Skargl
61238722Skargl#include <stdio.h>
62238722Skargl#include <openssl/err.h>
63238722Skargl#include <openssl/ecdh.h>
64238722Skargl
65238722Skargl/* BEGIN ERROR CODES */
66238722Skargl#ifndef OPENSSL_NO_ERR
67238722Skargl
68238722Skargl#define ERR_FUNC(func) ERR_PACK(ERR_LIB_ECDH,func,0)
69238722Skargl#define ERR_REASON(reason) ERR_PACK(ERR_LIB_ECDH,0,reason)
70238722Skargl
71238722Skarglstatic ERR_STRING_DATA ECDH_str_functs[]=
72238722Skargl	{
73238722Skargl{ERR_FUNC(ECDH_F_ECDH_COMPUTE_KEY),	"ECDH_compute_key"},
74238722Skargl{ERR_FUNC(ECDH_F_ECDH_DATA_NEW_METHOD),	"ECDH_DATA_NEW_METHOD"},
75238722Skargl{0,NULL}
76238722Skargl	};
77238722Skargl
78238722Skarglstatic ERR_STRING_DATA ECDH_str_reasons[]=
79238722Skargl	{
80238722Skargl{ERR_REASON(ECDH_R_KDF_FAILED)           ,"KDF failed"},
81238722Skargl{ERR_REASON(ECDH_R_NO_PRIVATE_VALUE)     ,"no private value"},
82238722Skargl{ERR_REASON(ECDH_R_POINT_ARITHMETIC_FAILURE),"point arithmetic failure"},
83238722Skargl{0,NULL}
84238722Skargl	};
85238722Skargl
86238722Skargl#endif
87238722Skargl
88238722Skarglvoid ERR_load_ECDH_strings(void)
89238722Skargl	{
90238722Skargl#ifndef OPENSSL_NO_ERR
91238722Skargl
92238722Skargl	if (ERR_func_error_string(ECDH_str_functs[0].error) == NULL)
93238722Skargl		{
94238722Skargl		ERR_load_strings(0,ECDH_str_functs);
95238722Skargl		ERR_load_strings(0,ECDH_str_reasons);
96238722Skargl		}
97238722Skargl#endif
98238722Skargl	}
99238722Skargl