mirror of https://github.com/openssl/openssl
Fix EVP_RAND-SEED-SRC documentation example
Fixes #22810 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22857)
This commit is contained in:
parent
6b7a11d8aa
commit
58d926213f
|
@ -49,9 +49,10 @@ A context for the seed source can be obtained by calling:
|
|||
OSSL_PARAM params[2], *p = params;
|
||||
unsigned int strength = 128;
|
||||
|
||||
/* Create a seed source */
|
||||
/* Create and instantiate a seed source */
|
||||
rand = EVP_RAND_fetch(NULL, "SEED-SRC", NULL);
|
||||
seed = EVP_RAND_CTX_new(rand, NULL);
|
||||
EVP_RAND_instantiate(seed, strength, 0, NULL, 0, NULL);
|
||||
EVP_RAND_free(rand);
|
||||
|
||||
/* Feed this into a DRBG */
|
||||
|
|
Loading…
Reference in New Issue