summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rand/rand.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rand/rand.h')
-rw-r--r--src/lib/libcrypto/rand/rand.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/libcrypto/rand/rand.h b/src/lib/libcrypto/rand/rand.h
index ac6c021763..604df9be6c 100644
--- a/src/lib/libcrypto/rand/rand.h
+++ b/src/lib/libcrypto/rand/rand.h
@@ -72,13 +72,10 @@ extern "C" {
72#endif 72#endif
73 73
74#if defined(OPENSSL_FIPS) 74#if defined(OPENSSL_FIPS)
75#define FIPS_RAND_SIZE_T size_t 75#define FIPS_RAND_SIZE_T int
76#endif 76#endif
77 77
78/* Already defined in ossl_typ.h */ 78typedef struct rand_meth_st
79/* typedef struct rand_meth_st RAND_METHOD; */
80
81struct rand_meth_st
82 { 79 {
83 void (*seed)(const void *buf, int num); 80 void (*seed)(const void *buf, int num);
84 int (*bytes)(unsigned char *buf, int num); 81 int (*bytes)(unsigned char *buf, int num);
@@ -86,7 +83,7 @@ struct rand_meth_st
86 void (*add)(const void *buf, int num, double entropy); 83 void (*add)(const void *buf, int num, double entropy);
87 int (*pseudorand)(unsigned char *buf, int num); 84 int (*pseudorand)(unsigned char *buf, int num);
88 int (*status)(void); 85 int (*status)(void);
89 }; 86 } RAND_METHOD;
90 87
91#ifdef BN_DEBUG 88#ifdef BN_DEBUG
92extern int rand_predictable; 89extern int rand_predictable;
@@ -128,11 +125,17 @@ void ERR_load_RAND_strings(void);
128/* Error codes for the RAND functions. */ 125/* Error codes for the RAND functions. */
129 126
130/* Function codes. */ 127/* Function codes. */
128#define RAND_F_FIPS_RAND_BYTES 102
131#define RAND_F_RAND_GET_RAND_METHOD 101 129#define RAND_F_RAND_GET_RAND_METHOD 101
132#define RAND_F_SSLEAY_RAND_BYTES 100 130#define RAND_F_SSLEAY_RAND_BYTES 100
133 131
134/* Reason codes. */ 132/* Reason codes. */
133#define RAND_R_NON_FIPS_METHOD 101
134#define RAND_R_PRNG_ASKING_FOR_TOO_MUCH 105
135#define RAND_R_PRNG_NOT_REKEYED 103
136#define RAND_R_PRNG_NOT_RESEEDED 104
135#define RAND_R_PRNG_NOT_SEEDED 100 137#define RAND_R_PRNG_NOT_SEEDED 100
138#define RAND_R_PRNG_STUCK 102
136 139
137#ifdef __cplusplus 140#ifdef __cplusplus
138} 141}