summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rand/rand_err.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/rand/rand_err.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/src/lib/libcrypto/rand/rand_err.c b/src/lib/libcrypto/rand/rand_err.c
index c4c80fc8cc..64ae6e0650 100644
--- a/src/lib/libcrypto/rand/rand_err.c
+++ b/src/lib/libcrypto/rand/rand_err.c
@@ -7,7 +7,7 @@
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 11 *
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in 13 * notice, this list of conditions and the following disclaimer in
@@ -68,34 +68,31 @@
68#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RAND,func,0) 68#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RAND,func,0)
69#define ERR_REASON(reason) ERR_PACK(ERR_LIB_RAND,0,reason) 69#define ERR_REASON(reason) ERR_PACK(ERR_LIB_RAND,0,reason)
70 70
71static ERR_STRING_DATA RAND_str_functs[]= 71static ERR_STRING_DATA RAND_str_functs[]= {
72 { 72 {ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"},
73{ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"}, 73 {ERR_FUNC(RAND_F_RAND_INIT_FIPS), "RAND_init_fips"},
74{ERR_FUNC(RAND_F_RAND_INIT_FIPS), "RAND_init_fips"}, 74 {ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES), "SSLEAY_RAND_BYTES"},
75{ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES), "SSLEAY_RAND_BYTES"}, 75 {0, NULL}
76{0,NULL} 76};
77 };
78 77
79static ERR_STRING_DATA RAND_str_reasons[]= 78static ERR_STRING_DATA RAND_str_reasons[]= {
80 { 79 {ERR_REASON(RAND_R_DUAL_EC_DRBG_DISABLED), "dual ec drbg disabled"},
81{ERR_REASON(RAND_R_DUAL_EC_DRBG_DISABLED),"dual ec drbg disabled"}, 80 {ERR_REASON(RAND_R_ERROR_INITIALISING_DRBG), "error initialising drbg"},
82{ERR_REASON(RAND_R_ERROR_INITIALISING_DRBG),"error initialising drbg"}, 81 {ERR_REASON(RAND_R_ERROR_INSTANTIATING_DRBG), "error instantiating drbg"},
83{ERR_REASON(RAND_R_ERROR_INSTANTIATING_DRBG),"error instantiating drbg"}, 82 {ERR_REASON(RAND_R_NO_FIPS_RANDOM_METHOD_SET), "no fips random method set"},
84{ERR_REASON(RAND_R_NO_FIPS_RANDOM_METHOD_SET),"no fips random method set"}, 83 {ERR_REASON(RAND_R_PRNG_NOT_SEEDED) , "PRNG not seeded"},
85{ERR_REASON(RAND_R_PRNG_NOT_SEEDED) ,"PRNG not seeded"}, 84 {0, NULL}
86{0,NULL} 85};
87 };
88 86
89#endif 87#endif
90 88
91void ERR_load_RAND_strings(void) 89void
92 { 90ERR_load_RAND_strings(void)
91{
93#ifndef OPENSSL_NO_ERR 92#ifndef OPENSSL_NO_ERR
94 93 if (ERR_func_error_string(RAND_str_functs[0].error) == NULL) {
95 if (ERR_func_error_string(RAND_str_functs[0].error) == NULL) 94 ERR_load_strings(0, RAND_str_functs);
96 { 95 ERR_load_strings(0, RAND_str_reasons);
97 ERR_load_strings(0,RAND_str_functs);
98 ERR_load_strings(0,RAND_str_reasons);
99 }
100#endif
101 } 96 }
97#endif
98}