strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67ea663
)
Test reset() of hasher in crypto tester
author
Martin Willi
<martin@revosec.ch>
Tue, 10 Jul 2012 11:19:36 +0000
(13:19 +0200)
committer
Martin Willi
<martin@revosec.ch>
Mon, 16 Jul 2012 12:55:07 +0000
(14:55 +0200)
src/libstrongswan/crypto/crypto_tester.c
patch
|
blob
|
history
diff --git
a/src/libstrongswan/crypto/crypto_tester.c
b/src/libstrongswan/crypto/crypto_tester.c
index
4fe10e7
..
a481612
100644
(file)
--- 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;