aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-09 16:51:51 +0000
committerlloyd <[email protected]>2008-09-09 16:51:51 +0000
commit6e90b22842424555dd53eb4e6aa0cc1061462567 (patch)
tree22b5819ce09e6ff4785636084ed65283367c1616
parent8ead00e737937d90343f0351a7e8baafacbf1327 (diff)
In get_cipher, do not call cipher->set_iv unless the IV is non-empty
-rw-r--r--src/engine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 0a4bb48ee..8511c07c2 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -350,7 +350,10 @@ Keyed_Filter* get_cipher(const std::string& algo_spec,
{
Keyed_Filter* cipher = get_cipher(algo_spec, direction);
cipher->set_key(key);
- cipher->set_iv(iv);
+
+ if(iv.length())
+ cipher->set_iv(iv);
+
return cipher;
}