diff options
Diffstat (limited to 'src/lib/libcrypto/rand/rand_err.c')
-rw-r--r-- | src/lib/libcrypto/rand/rand_err.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rand/rand_err.c b/src/lib/libcrypto/rand/rand_err.c index 386934dcd1..97f96e1aee 100644 --- a/src/lib/libcrypto/rand/rand_err.c +++ b/src/lib/libcrypto/rand/rand_err.c | |||
@@ -70,6 +70,7 @@ | |||
70 | 70 | ||
71 | static ERR_STRING_DATA RAND_str_functs[]= | 71 | static ERR_STRING_DATA RAND_str_functs[]= |
72 | { | 72 | { |
73 | {ERR_FUNC(RAND_F_FIPS_RAND_BYTES), "FIPS_RAND_BYTES"}, | ||
73 | {ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"}, | 74 | {ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"}, |
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} |
@@ -77,7 +78,12 @@ static ERR_STRING_DATA RAND_str_functs[]= | |||
77 | 78 | ||
78 | static ERR_STRING_DATA RAND_str_reasons[]= | 79 | static ERR_STRING_DATA RAND_str_reasons[]= |
79 | { | 80 | { |
81 | {ERR_REASON(RAND_R_NON_FIPS_METHOD) ,"non fips method"}, | ||
82 | {ERR_REASON(RAND_R_PRNG_ASKING_FOR_TOO_MUCH),"prng asking for too much"}, | ||
83 | {ERR_REASON(RAND_R_PRNG_NOT_REKEYED) ,"prng not rekeyed"}, | ||
84 | {ERR_REASON(RAND_R_PRNG_NOT_RESEEDED) ,"prng not reseeded"}, | ||
80 | {ERR_REASON(RAND_R_PRNG_NOT_SEEDED) ,"PRNG not seeded"}, | 85 | {ERR_REASON(RAND_R_PRNG_NOT_SEEDED) ,"PRNG not seeded"}, |
86 | {ERR_REASON(RAND_R_PRNG_STUCK) ,"prng stuck"}, | ||
81 | {0,NULL} | 87 | {0,NULL} |
82 | }; | 88 | }; |
83 | 89 | ||
@@ -85,12 +91,15 @@ static ERR_STRING_DATA RAND_str_reasons[]= | |||
85 | 91 | ||
86 | void ERR_load_RAND_strings(void) | 92 | void ERR_load_RAND_strings(void) |
87 | { | 93 | { |
88 | #ifndef OPENSSL_NO_ERR | 94 | static int init=1; |
89 | 95 | ||
90 | if (ERR_func_error_string(RAND_str_functs[0].error) == NULL) | 96 | if (init) |
91 | { | 97 | { |
98 | init=0; | ||
99 | #ifndef OPENSSL_NO_ERR | ||
92 | ERR_load_strings(0,RAND_str_functs); | 100 | ERR_load_strings(0,RAND_str_functs); |
93 | ERR_load_strings(0,RAND_str_reasons); | 101 | ERR_load_strings(0,RAND_str_reasons); |
94 | } | ||
95 | #endif | 102 | #endif |
103 | |||
104 | } | ||
96 | } | 105 | } |