diff options
author | lloyd <[email protected]> | 2008-09-09 16:51:51 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-09 16:51:51 +0000 |
commit | 6e90b22842424555dd53eb4e6aa0cc1061462567 (patch) | |
tree | 22b5819ce09e6ff4785636084ed65283367c1616 | |
parent | 8ead00e737937d90343f0351a7e8baafacbf1327 (diff) |
In get_cipher, do not call cipher->set_iv unless the IV is non-empty
-rw-r--r-- | src/engine.cpp | 5 |
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; } |