strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use IV length of a crypter instead of block size for IV calculations
[strongswan.git]
/
src
/
pluto
/
pkcs7.c
diff --git
a/src/pluto/pkcs7.c
b/src/pluto/pkcs7.c
index
9389178
..
10b2a4d
100644
(file)
--- a/
src/pluto/pkcs7.c
+++ b/
src/pluto/pkcs7.c
@@
-473,7
+473,7
@@
end:
DBG1(DBG_LIB, "symmetric key length %d is wrong", symmetric_key.len);
goto failed;
}
DBG1(DBG_LIB, "symmetric key length %d is wrong", symmetric_key.len);
goto failed;
}
- if (iv.len != crypter->get_
block
_size(crypter))
+ if (iv.len != crypter->get_
iv
_size(crypter))
{
DBG1(DBG_LIB, "IV length %d is wrong", iv.len);
goto failed;
{
DBG1(DBG_LIB, "IV length %d is wrong", iv.len);
goto failed;
@@
-668,7
+668,7
@@
chunk_t pkcs7_build_envelopedData(chunk_t data, certificate_t *cert, int enc_alg
rng->destroy(rng);
rng = lib->crypto->create_rng(lib->crypto, RNG_WEAK);
rng->destroy(rng);
rng = lib->crypto->create_rng(lib->crypto, RNG_WEAK);
- rng->allocate_bytes(rng, crypter->get_
block
_size(crypter), &iv);
+ rng->allocate_bytes(rng, crypter->get_
iv
_size(crypter), &iv);
DBG4(DBG_LIB, "initialization vector: %B", &iv);
rng->destroy(rng);
}
DBG4(DBG_LIB, "initialization vector: %B", &iv);
rng->destroy(rng);
}