summaryrefslogtreecommitdiffstats
path: root/crypto/rand/ossl_rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rand/ossl_rand.c')
-rw-r--r--crypto/rand/ossl_rand.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/crypto/rand/ossl_rand.c b/crypto/rand/ossl_rand.c
index 119c2b423a..063b55b4f1 100644
--- a/crypto/rand/ossl_rand.c
+++ b/crypto/rand/ossl_rand.c
@@ -27,10 +27,6 @@
#include <internal/thread_once.h>
#include "rand_lcl.h"
-#if defined(BN_DEBUG) || defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
-# define PREDICT 1
-#endif
-
#define STATE_SIZE 1023
typedef struct ossl_rand_state_st OSSL_RAND_STATE;
@@ -59,10 +55,6 @@ static unsigned int crypto_lock_rand = 0;
*/
static CRYPTO_THREAD_ID locking_threadid;
-#ifdef PREDICT
-int rand_predictable = 0;
-#endif
-
static int rand_hw_seed(EVP_MD_CTX *ctx);
static void rand_thread_cleanup(void *arg)
@@ -112,11 +104,6 @@ static int rand_add(const void *buf, int num, double add)
if (!num)
return 1;
-#ifdef PREDICT
- if (rand_predictable)
- return 1;
-#endif
-
/*
* (Based on the rand(3) manpage)
*
@@ -297,16 +284,6 @@ static int rand_bytes(unsigned char *buf, int num)
gettimeofday(&tv, NULL);
#endif
-#ifdef PREDICT
- if (rand_predictable) {
- unsigned char val = 1;
-
- for (i = 0; i < num; i++)
- buf[i] = val++;
- return (1);
- }
-#endif
-
if (num <= 0)
return 1;