Skip to content

Commit

Permalink
rand_lib: RAND_poll: Reseed in non-"no-deprecated" builds.
Browse files Browse the repository at this point in the history
In a non-"no-deprecated" libcrypto build with a default configuration,
RAND_get_rand_method() == RAND_OpenSSL() and so needs to fall through to
the RAND_seed call (used in "no-deprecated" builds) to perform a reseed.

CLA: trivial
  • Loading branch information
mkasick committed Jun 9, 2023
1 parent 8a2e74d commit 541bbbb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crypto/rand/rand_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,13 @@ int RAND_poll(void)
ret = 1;
err:
ossl_rand_pool_free(pool);
return ret;
}
return ret;
# else
# endif
static const char salt[] = "polling";

RAND_seed(salt, sizeof(salt));
return 1;
# endif
}

# ifndef OPENSSL_NO_DEPRECATED_3_0
Expand Down

0 comments on commit 541bbbb

Please sign in to comment.