From: Jamie Cui Date: Wed, 29 Nov 2023 01:28:58 +0000 (+0000) Subject: Fix EVP_RAND-SEED-SRC documentation example X-Git-Tag: openssl-3.3.0-alpha1~552 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58d926213f00ba7046d0868de8b37929aa067a1f;p=thirdparty%2Fopenssl.git Fix EVP_RAND-SEED-SRC documentation example Fixes #22810 Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/22857) --- diff --git a/doc/man7/EVP_RAND-SEED-SRC.pod b/doc/man7/EVP_RAND-SEED-SRC.pod index 8bbd5794720..a00ed328d52 100644 --- a/doc/man7/EVP_RAND-SEED-SRC.pod +++ b/doc/man7/EVP_RAND-SEED-SRC.pod @@ -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 */