159191Skris/* crypto/rand/rand_err.c */
259191Skris/* ====================================================================
3238405Sjkim * Copyright (c) 1999-2011 The OpenSSL Project.  All rights reserved.
459191Skris *
559191Skris * Redistribution and use in source and binary forms, with or without
659191Skris * modification, are permitted provided that the following conditions
759191Skris * are met:
859191Skris *
959191Skris * 1. Redistributions of source code must retain the above copyright
10296341Sdelphij *    notice, this list of conditions and the following disclaimer.
1159191Skris *
1259191Skris * 2. Redistributions in binary form must reproduce the above copyright
1359191Skris *    notice, this list of conditions and the following disclaimer in
1459191Skris *    the documentation and/or other materials provided with the
1559191Skris *    distribution.
1659191Skris *
1759191Skris * 3. All advertising materials mentioning features or use of this
1859191Skris *    software must display the following acknowledgment:
1959191Skris *    "This product includes software developed by the OpenSSL Project
2059191Skris *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
2159191Skris *
2259191Skris * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
2359191Skris *    endorse or promote products derived from this software without
2459191Skris *    prior written permission. For written permission, please contact
2559191Skris *    openssl-core@OpenSSL.org.
2659191Skris *
2759191Skris * 5. Products derived from this software may not be called "OpenSSL"
2859191Skris *    nor may "OpenSSL" appear in their names without prior written
2959191Skris *    permission of the OpenSSL Project.
3059191Skris *
3159191Skris * 6. Redistributions of any form whatsoever must retain the following
3259191Skris *    acknowledgment:
3359191Skris *    "This product includes software developed by the OpenSSL Project
3459191Skris *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
3559191Skris *
3659191Skris * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
3759191Skris * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3859191Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
3959191Skris * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
4059191Skris * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4159191Skris * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4259191Skris * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4359191Skris * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4459191Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4559191Skris * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
4659191Skris * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
4759191Skris * OF THE POSSIBILITY OF SUCH DAMAGE.
4859191Skris * ====================================================================
4959191Skris *
5059191Skris * This product includes cryptographic software written by Eric Young
5159191Skris * (eay@cryptsoft.com).  This product includes software written by Tim
5259191Skris * Hudson (tjh@cryptsoft.com).
5359191Skris *
5459191Skris */
5559191Skris
56296341Sdelphij/*
57296341Sdelphij * NOTE: this file was auto generated by the mkerr.pl script: any changes
5859191Skris * made to it will be overwritten when the script next updates this file,
5959191Skris * only reason strings will be preserved.
6059191Skris */
6159191Skris
6259191Skris#include <stdio.h>
6359191Skris#include <openssl/err.h>
6459191Skris#include <openssl/rand.h>
6559191Skris
6659191Skris/* BEGIN ERROR CODES */
67109998Smarkm#ifndef OPENSSL_NO_ERR
68160814Ssimon
69296341Sdelphij# define ERR_FUNC(func) ERR_PACK(ERR_LIB_RAND,func,0)
70296341Sdelphij# define ERR_REASON(reason) ERR_PACK(ERR_LIB_RAND,0,reason)
71160814Ssimon
72296341Sdelphijstatic ERR_STRING_DATA RAND_str_functs[] = {
73296341Sdelphij    {ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"},
74296341Sdelphij    {ERR_FUNC(RAND_F_RAND_INIT_FIPS), "RAND_init_fips"},
75296341Sdelphij    {ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES), "SSLEAY_RAND_BYTES"},
76296341Sdelphij    {0, NULL}
77296341Sdelphij};
7859191Skris
79296341Sdelphijstatic ERR_STRING_DATA RAND_str_reasons[] = {
80296341Sdelphij    {ERR_REASON(RAND_R_DUAL_EC_DRBG_DISABLED), "dual ec drbg disabled"},
81296341Sdelphij    {ERR_REASON(RAND_R_ERROR_INITIALISING_DRBG), "error initialising drbg"},
82296341Sdelphij    {ERR_REASON(RAND_R_ERROR_INSTANTIATING_DRBG), "error instantiating drbg"},
83296341Sdelphij    {ERR_REASON(RAND_R_NO_FIPS_RANDOM_METHOD_SET),
84296341Sdelphij     "no fips random method set"},
85296341Sdelphij    {ERR_REASON(RAND_R_PRNG_NOT_SEEDED), "PRNG not seeded"},
86296341Sdelphij    {0, NULL}
87296341Sdelphij};
8859191Skris
8959191Skris#endif
9059191Skris
9159191Skrisvoid ERR_load_RAND_strings(void)
92296341Sdelphij{
93167612Ssimon#ifndef OPENSSL_NO_ERR
9459191Skris
95296341Sdelphij    if (ERR_func_error_string(RAND_str_functs[0].error) == NULL) {
96296341Sdelphij        ERR_load_strings(0, RAND_str_functs);
97296341Sdelphij        ERR_load_strings(0, RAND_str_reasons);
98296341Sdelphij    }
9959191Skris#endif
100296341Sdelphij}
101