aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/openssl/ossl_bc.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-06-07 23:58:28 +0000
committerlloyd <[email protected]>2012-06-07 23:58:28 +0000
commit1ca43e0c8caba8b2517122b46e83bf4ca5d79005 (patch)
treea1365d38c763cfd66844f7ad29f1f19ce05d15cd /src/engine/openssl/ossl_bc.cpp
parent8a7eb1f73c503b289a6f4bc56f5ebef806c9d4e6 (diff)
Update cms, cvc, zlib, bzip2, openssl, and gnump modules for the new
allocator interface. The compression filters now just use malloc/free with a memset. Add a new info.txt field <warning>, like comment but warns. Use for CMS which is pretty broken (doesn't even compile anymore), and for TLS.
Diffstat (limited to 'src/engine/openssl/ossl_bc.cpp')
-rw-r--r--src/engine/openssl/ossl_bc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/engine/openssl/ossl_bc.cpp b/src/engine/openssl/ossl_bc.cpp
index d419f56be..b3b509c36 100644
--- a/src/engine/openssl/ossl_bc.cpp
+++ b/src/engine/openssl/ossl_bc.cpp
@@ -123,7 +123,7 @@ void EVP_BlockCipher::decrypt_n(const byte in[], byte out[],
*/
void EVP_BlockCipher::key_schedule(const byte key[], size_t length)
{
- secure_vector<byte> full_key(key, length);
+ secure_vector<byte> full_key(key, key + length);
if(cipher_name == "TripleDES" && length == 16)
{
@@ -141,8 +141,8 @@ void EVP_BlockCipher::key_schedule(const byte key[], size_t length)
EVP_CIPHER_CTX_ctrl(&decrypt, EVP_CTRL_SET_RC2_KEY_BITS, length*8, 0);
}
- EVP_EncryptInit_ex(&encrypt, 0, 0, full_key.begin(), 0);
- EVP_DecryptInit_ex(&decrypt, 0, 0, full_key.begin(), 0);
+ EVP_EncryptInit_ex(&encrypt, 0, 0, &full_key[0], 0);
+ EVP_DecryptInit_ex(&decrypt, 0, 0, &full_key[0], 0);
}
/*