crypto-tester: Explicitly exclude FIPS-PRF from append mode tests
This was implicitly done by the seed length check before 58dda5d6, but we
now require an explicit check to avoid that unsupported use.
This commit is contained in:
@@ -920,14 +920,17 @@ METHOD(crypto_tester_t, test_prf, bool,
|
|||||||
{
|
{
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
/* do partial append mode and check if key gets set correctly */
|
if (alg != PRF_FIPS_SHA1_160)
|
||||||
if (!prf->get_bytes(prf, seed, NULL))
|
|
||||||
{
|
{
|
||||||
goto failure;
|
/* do partial append mode and check if key gets set correctly */
|
||||||
}
|
if (!prf->get_bytes(prf, seed, NULL))
|
||||||
if (!prf->set_key(prf, key))
|
{
|
||||||
{
|
goto failure;
|
||||||
goto failure;
|
}
|
||||||
|
if (!prf->set_key(prf, key))
|
||||||
|
{
|
||||||
|
goto failure;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* allocated bytes */
|
/* allocated bytes */
|
||||||
if (!prf->allocate_bytes(prf, seed, &out))
|
if (!prf->allocate_bytes(prf, seed, &out))
|
||||||
@@ -960,7 +963,7 @@ METHOD(crypto_tester_t, test_prf, bool,
|
|||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
/* bytes to existing buffer, using append mode */
|
/* bytes to existing buffer, using append mode */
|
||||||
if (seed.len > 2)
|
if (alg != PRF_FIPS_SHA1_160 && seed.len > 2)
|
||||||
{
|
{
|
||||||
memset(out.ptr, 0, out.len);
|
memset(out.ptr, 0, out.len);
|
||||||
if (vector->stateful)
|
if (vector->stateful)
|
||||||
|
|||||||
Reference in New Issue
Block a user