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
/
libstrongswan
/
plugins
/
pem
/
pem_builder.c
diff --git
a/src/libstrongswan/plugins/pem/pem_builder.c
b/src/libstrongswan/plugins/pem/pem_builder.c
index
34527d9
..
b760add
100644
(file)
--- a/
src/libstrongswan/plugins/pem/pem_builder.c
+++ b/
src/libstrongswan/plugins/pem/pem_builder.c
@@
-127,8
+127,8
@@
static status_t pem_decrypt(chunk_t *blob, encryption_algorithm_t alg,
}
crypter->set_key(crypter, key);
}
crypter->set_key(crypter, key);
- if (iv.len != crypter->get_
block
_size(crypter) ||
- blob->len %
iv.len
)
+ if (iv.len != crypter->get_
iv
_size(crypter) ||
+ blob->len %
crypter->get_block_size(crypter)
)
{
crypter->destroy(crypter);
DBG1(DBG_LIB, " data size is not multiple of block size");
{
crypter->destroy(crypter);
DBG1(DBG_LIB, " data size is not multiple of block size");