Displaying 1 result from an estimated 1 matches for "evp_cipher_ctx_copy".
2011 Sep 07
0
cipher_get_keycontext() and cipher_set_keycontext() copying OpenSSL RC4 cryptographic state
...en doing some work to make OpenSSH use alternative crypto engines and it appears to me that this code may not work correctly when using an OpenSSL engine.
The cipher_data could contain pointers to other data objects so just copying the cipher_data is not going to work correctly.
OpenSSL provides EVP_CIPHER_CTX_copy() which can be used to safely copy the cryptographic state of an EVP_CIPHER_CTX.
This API will call an engine specific interface to perform the copy, if required by the engine, ensuring that the cipher_data is copied correctly.
It's unclear exactly how EVP_CIPHER_CTX_copy() can be used in the...