summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/rand/rand.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/rand/rand.h')
-rw-r--r--lib/libcrypto/rand/rand.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/libcrypto/rand/rand.h b/lib/libcrypto/rand/rand.h
index 604df9be6c3..ac6c0217636 100644
--- a/lib/libcrypto/rand/rand.h
+++ b/lib/libcrypto/rand/rand.h
@@ -72,10 +72,13 @@ extern "C" {
#endif
#if defined(OPENSSL_FIPS)
-#define FIPS_RAND_SIZE_T int
+#define FIPS_RAND_SIZE_T size_t
#endif
-typedef struct rand_meth_st
+/* Already defined in ossl_typ.h */
+/* typedef struct rand_meth_st RAND_METHOD; */
+
+struct rand_meth_st
{
void (*seed)(const void *buf, int num);
int (*bytes)(unsigned char *buf, int num);
@@ -83,7 +86,7 @@ typedef struct rand_meth_st
void (*add)(const void *buf, int num, double entropy);
int (*pseudorand)(unsigned char *buf, int num);
int (*status)(void);
- } RAND_METHOD;
+ };
#ifdef BN_DEBUG
extern int rand_predictable;
@@ -125,17 +128,11 @@ void ERR_load_RAND_strings(void);
/* Error codes for the RAND functions. */
/* Function codes. */
-#define RAND_F_FIPS_RAND_BYTES 102
#define RAND_F_RAND_GET_RAND_METHOD 101
#define RAND_F_SSLEAY_RAND_BYTES 100
/* Reason codes. */
-#define RAND_R_NON_FIPS_METHOD 101
-#define RAND_R_PRNG_ASKING_FOR_TOO_MUCH 105
-#define RAND_R_PRNG_NOT_REKEYED 103
-#define RAND_R_PRNG_NOT_RESEEDED 104
#define RAND_R_PRNG_NOT_SEEDED 100
-#define RAND_R_PRNG_STUCK 102
#ifdef __cplusplus
}