Skip to content

Commit eba3ebd

Browse files
committed
Add a dummy call to BN_rand_ex() in the FIPS provider
The previous commit made BIGNUM RAND operations available from within the FIPS provider. We test this out by making a dummy call to check it completes successfully. Reviewed-by: Matthias St. Pierre <[email protected]> (Merged from openssl#9193)
1 parent ee1d4f3 commit eba3ebd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

providers/fips/fipsprov.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ static int dummy_evp_call(void *provctx)
120120
if (RAND_DRBG_bytes(drbg, randbuf, sizeof(randbuf)) <= 0)
121121
goto err;
122122

123+
if (!BN_rand_ex(a, 256, BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY, bnctx))
124+
goto err;
125+
123126
ret = 1;
124127
err:
125128
BN_CTX_end(bnctx);

0 commit comments

Comments
 (0)