aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-07-10 13:19:36 +0200
committerMartin Willi <martin@revosec.ch>2012-07-16 14:55:07 +0200
commit44fc169579c8ac40b90258e2e399740d9564ab4a (patch)
tree7d5c2d9060593814a9afbd1619a7afc33078295e /src
parent67ea663d7cc22d09da1d89ff15edd8129a918484 (diff)
downloadstrongswan-44fc169579c8ac40b90258e2e399740d9564ab4a.tar.bz2
strongswan-44fc169579c8ac40b90258e2e399740d9564ab4a.tar.xz
Test reset() of hasher in crypto tester
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/crypto/crypto_tester.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libstrongswan/crypto/crypto_tester.c b/src/libstrongswan/crypto/crypto_tester.c
index 4fe10e74f..a481612c6 100644
--- a/src/libstrongswan/crypto/crypto_tester.c
+++ b/src/libstrongswan/crypto/crypto_tester.c
@@ -746,8 +746,16 @@ METHOD(crypto_tester_t, test_hasher, bool,
{
goto failure;
}
- /* hash to existing buffer */
+ /* hash to existing buffer, with a reset */
memset(hash.ptr, 0, hash.len);
+ if (!hasher->get_hash(hasher, data, NULL))
+ {
+ goto failure;
+ }
+ if (!hasher->reset(hasher))
+ {
+ goto failure;
+ }
if (!hasher->get_hash(hasher, data, hash.ptr))
{
goto failure;