]>
Commit | Line | Data |
---|---|---|
b6cff313 RS |
1 | /* |
2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. | |
eb952088 | 3 | * |
b6cff313 RS |
4 | * Licensed under the OpenSSL license (the "License"). You may not use |
5 | * this file except in compliance with the License. You can obtain a copy | |
6 | * in the file LICENSE in the source distribution or at | |
7 | * https://www.openssl.org/source/license.html | |
eb952088 UM |
8 | */ |
9 | ||
0f113f3e MC |
10 | /* |
11 | * NOTE: this file was auto generated by the mkerr.pl script: any changes | |
59fc2b0f BM |
12 | * made to it will be overwritten when the script next updates this file, |
13 | * only reason strings will be preserved. | |
eb952088 UM |
14 | */ |
15 | ||
16 | #include <stdio.h> | |
17 | #include <openssl/err.h> | |
18 | #include <openssl/rand.h> | |
19 | ||
20 | /* BEGIN ERROR CODES */ | |
cf1b7d96 | 21 | #ifndef OPENSSL_NO_ERR |
29dc3508 | 22 | |
0f113f3e MC |
23 | # define ERR_FUNC(func) ERR_PACK(ERR_LIB_RAND,func,0) |
24 | # define ERR_REASON(reason) ERR_PACK(ERR_LIB_RAND,0,reason) | |
29dc3508 | 25 | |
0f113f3e MC |
26 | static ERR_STRING_DATA RAND_str_functs[] = { |
27 | {ERR_FUNC(RAND_F_FIPS_RAND), "FIPS_RAND"}, | |
28 | {ERR_FUNC(RAND_F_FIPS_RAND_SET_DT), "FIPS_RAND_SET_DT"}, | |
29 | {ERR_FUNC(RAND_F_FIPS_SET_PRNG_SEED), "FIPS_SET_PRNG_SEED"}, | |
30 | {ERR_FUNC(RAND_F_FIPS_SET_TEST_MODE), "FIPS_SET_TEST_MODE"}, | |
31 | {ERR_FUNC(RAND_F_FIPS_X931_SET_DT), "FIPS_x931_set_dt"}, | |
b0700d2c | 32 | {ERR_FUNC(RAND_F_RAND_BYTES), "RAND_bytes"}, |
0f113f3e | 33 | {ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"}, |
0f113f3e MC |
34 | {0, NULL} |
35 | }; | |
eb952088 | 36 | |
0f113f3e MC |
37 | static ERR_STRING_DATA RAND_str_reasons[] = { |
38 | {ERR_REASON(RAND_R_NOT_IN_TEST_MODE), "not in test mode"}, | |
39 | {ERR_REASON(RAND_R_NO_KEY_SET), "no key set"}, | |
40 | {ERR_REASON(RAND_R_PRNG_ERROR), "prng error"}, | |
41 | {ERR_REASON(RAND_R_PRNG_KEYED), "prng keyed"}, | |
42 | {ERR_REASON(RAND_R_PRNG_NOT_SEEDED), "PRNG not seeded"}, | |
43 | {ERR_REASON(RAND_R_PRNG_SEED_MUST_NOT_MATCH_KEY), | |
44 | "prng seed must not match key"}, | |
45 | {ERR_REASON(RAND_R_PRNG_STUCK), "prng stuck"}, | |
46 | {0, NULL} | |
47 | }; | |
eb952088 UM |
48 | |
49 | #endif | |
50 | ||
51 | void ERR_load_RAND_strings(void) | |
0f113f3e | 52 | { |
47a9d527 | 53 | #ifndef OPENSSL_NO_ERR |
eb952088 | 54 | |
0f113f3e MC |
55 | if (ERR_func_error_string(RAND_str_functs[0].error) == NULL) { |
56 | ERR_load_strings(0, RAND_str_functs); | |
57 | ERR_load_strings(0, RAND_str_reasons); | |
58 | } | |
47a9d527 | 59 | #endif |
0f113f3e | 60 | } |