diff options
Diffstat (limited to 'src/lib/libcrypto/rand/rand_err.c')
-rw-r--r-- | src/lib/libcrypto/rand/rand_err.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/lib/libcrypto/rand/rand_err.c b/src/lib/libcrypto/rand/rand_err.c index 95574659ac..97f96e1aee 100644 --- a/src/lib/libcrypto/rand/rand_err.c +++ b/src/lib/libcrypto/rand/rand_err.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* crypto/rand/rand_err.c */ | 1 | /* crypto/rand/rand_err.c */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
@@ -64,22 +64,26 @@ | |||
64 | 64 | ||
65 | /* BEGIN ERROR CODES */ | 65 | /* BEGIN ERROR CODES */ |
66 | #ifndef OPENSSL_NO_ERR | 66 | #ifndef OPENSSL_NO_ERR |
67 | |||
68 | #define ERR_FUNC(func) ERR_PACK(ERR_LIB_RAND,func,0) | ||
69 | #define ERR_REASON(reason) ERR_PACK(ERR_LIB_RAND,0,reason) | ||
70 | |||
67 | static ERR_STRING_DATA RAND_str_functs[]= | 71 | static ERR_STRING_DATA RAND_str_functs[]= |
68 | { | 72 | { |
69 | {ERR_PACK(0,RAND_F_FIPS_RAND_BYTES,0), "FIPS_RAND_BYTES"}, | 73 | {ERR_FUNC(RAND_F_FIPS_RAND_BYTES), "FIPS_RAND_BYTES"}, |
70 | {ERR_PACK(0,RAND_F_RAND_GET_RAND_METHOD,0), "RAND_get_rand_method"}, | 74 | {ERR_FUNC(RAND_F_RAND_GET_RAND_METHOD), "RAND_get_rand_method"}, |
71 | {ERR_PACK(0,RAND_F_SSLEAY_RAND_BYTES,0), "SSLEAY_RAND_BYTES"}, | 75 | {ERR_FUNC(RAND_F_SSLEAY_RAND_BYTES), "SSLEAY_RAND_BYTES"}, |
72 | {0,NULL} | 76 | {0,NULL} |
73 | }; | 77 | }; |
74 | 78 | ||
75 | static ERR_STRING_DATA RAND_str_reasons[]= | 79 | static ERR_STRING_DATA RAND_str_reasons[]= |
76 | { | 80 | { |
77 | {RAND_R_NON_FIPS_METHOD ,"non fips method"}, | 81 | {ERR_REASON(RAND_R_NON_FIPS_METHOD) ,"non fips method"}, |
78 | {RAND_R_PRNG_ASKING_FOR_TOO_MUCH ,"prng asking for too much"}, | 82 | {ERR_REASON(RAND_R_PRNG_ASKING_FOR_TOO_MUCH),"prng asking for too much"}, |
79 | {RAND_R_PRNG_NOT_REKEYED ,"prng not rekeyed"}, | 83 | {ERR_REASON(RAND_R_PRNG_NOT_REKEYED) ,"prng not rekeyed"}, |
80 | {RAND_R_PRNG_NOT_RESEEDED ,"prng not reseeded"}, | 84 | {ERR_REASON(RAND_R_PRNG_NOT_RESEEDED) ,"prng not reseeded"}, |
81 | {RAND_R_PRNG_NOT_SEEDED ,"PRNG not seeded"}, | 85 | {ERR_REASON(RAND_R_PRNG_NOT_SEEDED) ,"PRNG not seeded"}, |
82 | {RAND_R_PRNG_STUCK ,"prng stuck"}, | 86 | {ERR_REASON(RAND_R_PRNG_STUCK) ,"prng stuck"}, |
83 | {0,NULL} | 87 | {0,NULL} |
84 | }; | 88 | }; |
85 | 89 | ||
@@ -93,8 +97,8 @@ void ERR_load_RAND_strings(void) | |||
93 | { | 97 | { |
94 | init=0; | 98 | init=0; |
95 | #ifndef OPENSSL_NO_ERR | 99 | #ifndef OPENSSL_NO_ERR |
96 | ERR_load_strings(ERR_LIB_RAND,RAND_str_functs); | 100 | ERR_load_strings(0,RAND_str_functs); |
97 | ERR_load_strings(ERR_LIB_RAND,RAND_str_reasons); | 101 | ERR_load_strings(0,RAND_str_reasons); |
98 | #endif | 102 | #endif |
99 | 103 | ||
100 | } | 104 | } |