aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2011-12-14 17:34:57 +0100
committerMartin Willi <martin@revosec.ch>2012-03-20 17:31:22 +0100
commit7b1e15ac4e45ce4d6989f7be859f7337fa4a44ca (patch)
tree58db4f4f716d92a15fa9857cfee90d06f6672dfc /src
parent3ba15819edb44d00f5c9f8ad06ea7e78a48515c4 (diff)
downloadstrongswan-7b1e15ac4e45ce4d6989f7be859f7337fa4a44ca.tar.bz2
strongswan-7b1e15ac4e45ce4d6989f7be859f7337fa4a44ca.tar.xz
Fixed IKEv1 prf+ keymat expansion beyond 320 bits
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/crypto/prf_plus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/crypto/prf_plus.c b/src/libstrongswan/crypto/prf_plus.c
index 29f61197d..0f06ede83 100644
--- a/src/libstrongswan/crypto/prf_plus.c
+++ b/src/libstrongswan/crypto/prf_plus.c
@@ -72,12 +72,12 @@ METHOD(prf_plus_t, get_bytes, void,
this->prf->get_bytes(this->prf, this->seed, NULL);
this->prf->get_bytes(this->prf, chunk_from_thing(this->counter),
this->buffer.ptr);
+ this->counter++;
}
else
{
this->prf->get_bytes(this->prf, this->seed, this->buffer.ptr);
}
- this->counter++;
this->used = 0;
}
round = min(length, this->buffer.len - this->used);