]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
openssl: Return the proper IV length for OpenSSL crypters
authorTobias Brunner <tobias@strongswan.org>
Fri, 20 Feb 2015 12:34:04 +0000 (13:34 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 23 Feb 2015 10:29:07 +0000 (11:29 +0100)
For instance, the NULL cipher has a block size of 1 but an IV length
of 0.

Fixes #854.

src/libstrongswan/plugins/openssl/openssl_crypter.c

index 07b96b3200a1aa10900f8d1603246f85c1816423..c2478a4ed96cd91628ffa41de0e5900ab393fb30 100644 (file)
@@ -135,7 +135,7 @@ METHOD(crypter_t, get_block_size, size_t,
 METHOD(crypter_t, get_iv_size, size_t,
        private_openssl_crypter_t *this)
 {
-       return this->cipher->block_size;
+       return this->cipher->iv_len;
 }
 
 METHOD(crypter_t, get_key_size, size_t,