aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libstrongswan/crypto/crypto_tester.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/libstrongswan/crypto/crypto_tester.c b/src/libstrongswan/crypto/crypto_tester.c
index 1047030cf..15ed17381 100644
--- a/src/libstrongswan/crypto/crypto_tester.c
+++ b/src/libstrongswan/crypto/crypto_tester.c
@@ -920,14 +920,17 @@ METHOD(crypto_tester_t, test_prf, bool,
{
goto failure;
}
- /* do partial append mode and check if key gets set correctly */
- if (!prf->get_bytes(prf, seed, NULL))
+ if (alg != PRF_FIPS_SHA1_160)
{
- goto failure;
- }
- if (!prf->set_key(prf, key))
- {
- goto failure;
+ /* do partial append mode and check if key gets set correctly */
+ if (!prf->get_bytes(prf, seed, NULL))
+ {
+ goto failure;
+ }
+ if (!prf->set_key(prf, key))
+ {
+ goto failure;
+ }
}
/* allocated bytes */
if (!prf->allocate_bytes(prf, seed, &out))
@@ -960,7 +963,7 @@ METHOD(crypto_tester_t, test_prf, bool,
goto failure;
}
/* 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);
if (vector->stateful)