diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-08-05 15:41:45 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-10-11 15:55:40 +0200 |
commit | e8229ad558efcb7b07c6ef0f77269120d49500f9 (patch) | |
tree | 381b9b0c797ba4642775b9aa0f933dbb89239a47 /src/libstrongswan/crypto/iv/iv_gen_rand.c | |
parent | d74c254dfd88b497a5262a3d8ce2dc7a684c74a8 (diff) | |
download | strongswan-e8229ad558efcb7b07c6ef0f77269120d49500f9.tar.bz2 strongswan-e8229ad558efcb7b07c6ef0f77269120d49500f9.tar.xz |
iv_gen: Provide external sequence number (IKE, ESP)
This prevents duplicate sequential IVs in case of a HA failover.
Diffstat (limited to 'src/libstrongswan/crypto/iv/iv_gen_rand.c')
-rw-r--r-- | src/libstrongswan/crypto/iv/iv_gen_rand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/crypto/iv/iv_gen_rand.c b/src/libstrongswan/crypto/iv/iv_gen_rand.c index 3448ee041..2bed63fcc 100644 --- a/src/libstrongswan/crypto/iv/iv_gen_rand.c +++ b/src/libstrongswan/crypto/iv/iv_gen_rand.c @@ -36,7 +36,7 @@ struct private_iv_gen_t { }; METHOD(iv_gen_t, get_iv, bool, - private_iv_gen_t *this, size_t size, u_int8_t *buffer) + private_iv_gen_t *this, u_int64_t seq, size_t size, u_int8_t *buffer) { if (!this->rng) { @@ -46,7 +46,7 @@ METHOD(iv_gen_t, get_iv, bool, } METHOD(iv_gen_t, allocate_iv, bool, - private_iv_gen_t *this, size_t size, chunk_t *chunk) + private_iv_gen_t *this, u_int64_t seq, size_t size, chunk_t *chunk) { if (!this->rng) { |