1193645Ssimon/* crypto/jpake/jpake_err.c */
2193645Ssimon/* ====================================================================
3216166Ssimon * Copyright (c) 1999-2010 The OpenSSL Project.  All rights reserved.
4193645Ssimon *
5193645Ssimon * Redistribution and use in source and binary forms, with or without
6193645Ssimon * modification, are permitted provided that the following conditions
7193645Ssimon * are met:
8193645Ssimon *
9193645Ssimon * 1. Redistributions of source code must retain the above copyright
10280304Sjkim *    notice, this list of conditions and the following disclaimer.
11193645Ssimon *
12193645Ssimon * 2. Redistributions in binary form must reproduce the above copyright
13193645Ssimon *    notice, this list of conditions and the following disclaimer in
14193645Ssimon *    the documentation and/or other materials provided with the
15193645Ssimon *    distribution.
16193645Ssimon *
17193645Ssimon * 3. All advertising materials mentioning features or use of this
18193645Ssimon *    software must display the following acknowledgment:
19193645Ssimon *    "This product includes software developed by the OpenSSL Project
20193645Ssimon *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
21193645Ssimon *
22193645Ssimon * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23193645Ssimon *    endorse or promote products derived from this software without
24193645Ssimon *    prior written permission. For written permission, please contact
25193645Ssimon *    openssl-core@OpenSSL.org.
26193645Ssimon *
27193645Ssimon * 5. Products derived from this software may not be called "OpenSSL"
28193645Ssimon *    nor may "OpenSSL" appear in their names without prior written
29193645Ssimon *    permission of the OpenSSL Project.
30193645Ssimon *
31193645Ssimon * 6. Redistributions of any form whatsoever must retain the following
32193645Ssimon *    acknowledgment:
33193645Ssimon *    "This product includes software developed by the OpenSSL Project
34193645Ssimon *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
35193645Ssimon *
36193645Ssimon * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
37193645Ssimon * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38193645Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39193645Ssimon * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
40193645Ssimon * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41193645Ssimon * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42193645Ssimon * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43193645Ssimon * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44193645Ssimon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
45193645Ssimon * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46193645Ssimon * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
47193645Ssimon * OF THE POSSIBILITY OF SUCH DAMAGE.
48193645Ssimon * ====================================================================
49193645Ssimon *
50193645Ssimon * This product includes cryptographic software written by Eric Young
51193645Ssimon * (eay@cryptsoft.com).  This product includes software written by Tim
52193645Ssimon * Hudson (tjh@cryptsoft.com).
53193645Ssimon *
54193645Ssimon */
55193645Ssimon
56280304Sjkim/*
57280304Sjkim * NOTE: this file was auto generated by the mkerr.pl script: any changes
58193645Ssimon * made to it will be overwritten when the script next updates this file,
59193645Ssimon * only reason strings will be preserved.
60193645Ssimon */
61193645Ssimon
62193645Ssimon#include <stdio.h>
63193645Ssimon#include <openssl/err.h>
64193645Ssimon#include <openssl/jpake.h>
65193645Ssimon
66193645Ssimon/* BEGIN ERROR CODES */
67193645Ssimon#ifndef OPENSSL_NO_ERR
68193645Ssimon
69280304Sjkim# define ERR_FUNC(func) ERR_PACK(ERR_LIB_JPAKE,func,0)
70280304Sjkim# define ERR_REASON(reason) ERR_PACK(ERR_LIB_JPAKE,0,reason)
71193645Ssimon
72280304Sjkimstatic ERR_STRING_DATA JPAKE_str_functs[] = {
73280304Sjkim    {ERR_FUNC(JPAKE_F_JPAKE_STEP1_PROCESS), "JPAKE_STEP1_process"},
74280304Sjkim    {ERR_FUNC(JPAKE_F_JPAKE_STEP2_PROCESS), "JPAKE_STEP2_process"},
75280304Sjkim    {ERR_FUNC(JPAKE_F_JPAKE_STEP3A_PROCESS), "JPAKE_STEP3A_process"},
76280304Sjkim    {ERR_FUNC(JPAKE_F_JPAKE_STEP3B_PROCESS), "JPAKE_STEP3B_process"},
77280304Sjkim    {ERR_FUNC(JPAKE_F_VERIFY_ZKP), "VERIFY_ZKP"},
78280304Sjkim    {0, NULL}
79280304Sjkim};
80193645Ssimon
81280304Sjkimstatic ERR_STRING_DATA JPAKE_str_reasons[] = {
82280304Sjkim    {ERR_REASON(JPAKE_R_G_TO_THE_X3_IS_NOT_LEGAL),
83280304Sjkim     "g to the x3 is not legal"},
84280304Sjkim    {ERR_REASON(JPAKE_R_G_TO_THE_X4_IS_NOT_LEGAL),
85280304Sjkim     "g to the x4 is not legal"},
86280304Sjkim    {ERR_REASON(JPAKE_R_G_TO_THE_X4_IS_ONE), "g to the x4 is one"},
87280304Sjkim    {ERR_REASON(JPAKE_R_HASH_OF_HASH_OF_KEY_MISMATCH),
88280304Sjkim     "hash of hash of key mismatch"},
89280304Sjkim    {ERR_REASON(JPAKE_R_HASH_OF_KEY_MISMATCH), "hash of key mismatch"},
90280304Sjkim    {ERR_REASON(JPAKE_R_VERIFY_B_FAILED), "verify b failed"},
91280304Sjkim    {ERR_REASON(JPAKE_R_VERIFY_X3_FAILED), "verify x3 failed"},
92280304Sjkim    {ERR_REASON(JPAKE_R_VERIFY_X4_FAILED), "verify x4 failed"},
93280304Sjkim    {ERR_REASON(JPAKE_R_ZKP_VERIFY_FAILED), "zkp verify failed"},
94280304Sjkim    {0, NULL}
95280304Sjkim};
96193645Ssimon
97193645Ssimon#endif
98193645Ssimon
99193645Ssimonvoid ERR_load_JPAKE_strings(void)
100280304Sjkim{
101193645Ssimon#ifndef OPENSSL_NO_ERR
102193645Ssimon
103280304Sjkim    if (ERR_func_error_string(JPAKE_str_functs[0].error) == NULL) {
104280304Sjkim        ERR_load_strings(0, JPAKE_str_functs);
105280304Sjkim        ERR_load_strings(0, JPAKE_str_reasons);
106280304Sjkim    }
107193645Ssimon#endif
108280304Sjkim}
109