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:
964de0a
)
Fix tls_prf bug introduced with bc474883
author
Martin Willi
<martin@revosec.ch>
Tue, 17 Jul 2012 09:32:13 +0000
(11:32 +0200)
committer
Martin Willi
<martin@revosec.ch>
Tue, 17 Jul 2012 09:33:05 +0000
(11:33 +0200)
src/libtls/tls_prf.c
patch
|
blob
|
history
diff --git
a/src/libtls/tls_prf.c
b/src/libtls/tls_prf.c
index
a70b121
..
918de1e
100644
(file)
--- a/
src/libtls/tls_prf.c
+++ b/
src/libtls/tls_prf.c
@@
-55,11
+55,14
@@
static bool p_hash(prf_t *prf, char *label, chunk_t seed, size_t block_size,
while (TRUE)
{
+ /* A(i) = HMAC_hash(secret, A(i-1)) */
+ if (!prf->get_bytes(prf, a, abuf))
+ {
+ return FALSE;
+ }
a = chunk_from_thing(abuf);
- /* A(i) = HMAC_hash(secret, A(i-1))
- * HMAC_hash(secret, A(i) + seed) */
- if (!prf->get_bytes(prf, a, abuf) ||
- !prf->get_bytes(prf, a, NULL) ||
+ /* HMAC_hash(secret, A(i) + seed) */
+ if (!prf->get_bytes(prf, a, NULL) ||
!prf->get_bytes(prf, seed, buf))
{
return FALSE;