Skip to content

Commit

Permalink
Fix EVP_RAND-SEED-SRC documentation example
Browse files Browse the repository at this point in the history
Fixes #22810

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #22857)

(cherry picked from commit 58d9262)
  • Loading branch information
Jamie-Cui authored and t8m committed Nov 30, 2023
1 parent 992c50c commit 83975c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/man7/EVP_RAND-SEED-SRC.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 83975c6

Please sign in to comment.