提交 8e3e1dfe 编写于 作者: D Dr. Matthias St. Pierre

test/drbgtest.c: Remove error check for large generate requests

The behaviour of RAND_DRBG_generate() has changed. Previously, it
would fail for requests larger than max_request, now it automatically
splits large input into chunks (which was previously done only
by RAND_DRBG_bytes() before calling RAND_DRBG_generate()).

So this test has not only become obsolete, the fact that it succeeded
unexpectedly also caused a buffer overflow that terminated the test.
Reviewed-by: NPaul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11195)
上级 9fb6692c
......@@ -176,7 +176,6 @@ DRBG_SIZE_T(min_noncelen)
DRBG_SIZE_T(max_noncelen)
DRBG_SIZE_T(max_perslen)
DRBG_SIZE_T(max_adinlen)
DRBG_SIZE_T(max_request)
#define DRBG_UINT(name) \
static unsigned int name(RAND_DRBG *drbg) \
......@@ -491,11 +490,6 @@ static int error_check(DRBG_SELFTEST_DATA *td)
td->adin, td->adinlen)))
goto err;
/* Request too much data for one request */
if (!TEST_false(RAND_DRBG_generate(drbg, buff, max_request(drbg) + 1, 0,
td->adin, td->adinlen)))
goto err;
/* Try too large additional input */
if (!TEST_false(RAND_DRBG_generate(drbg, buff, td->exlen, 0,
td->adin, max_adinlen(drbg) + 1)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册