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:
ae44115
)
Make sure HMAC_Init is called before HMAC_Update, fixes crash
author
Martin Willi
<martin@revosec.ch>
Tue, 10 Jul 2012 07:03:38 +0000
(09:03 +0200)
committer
Martin Willi
<martin@revosec.ch>
Mon, 16 Jul 2012 12:55:07 +0000
(14:55 +0200)
src/libstrongswan/plugins/openssl/openssl_hmac.c
patch
|
blob
|
history
diff --git
a/src/libstrongswan/plugins/openssl/openssl_hmac.c
b/src/libstrongswan/plugins/openssl/openssl_hmac.c
index
feeecf5
..
b027e0f
100644
(file)
--- a/
src/libstrongswan/plugins/openssl/openssl_hmac.c
+++ b/
src/libstrongswan/plugins/openssl/openssl_hmac.c
@@
-159,6
+159,11
@@
static mac_t *hmac_create(hash_algorithm_t algo)
}
HMAC_CTX_init(&this->hmac);
+ if (!HMAC_Init_ex(&this->hmac, NULL, 0, this->hasher, NULL))
+ {
+ destroy(this);
+ return NULL;
+ }
return &this->public;
}