1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

wrapper: move EVP_CIPHER_CTX_free call to libcrypto.c

With this change, a HAVE_LIBCRYPTO #ifdef is removed from wrapper.c.
Now, the libcrypto-specific logic for EVP_CIPHER_CTX_free is moved
into the ssh_cipher_struct cleanup callback handler for those
ciphers.

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jon Simons
2017-07-14 19:47:48 -04:00
committed by Andreas Schneider
parent a5bc81d406
commit e66f370682
2 changed files with 3 additions and 6 deletions

View File

@@ -124,12 +124,6 @@ void ssh_cipher_clear(struct ssh_cipher_struct *cipher){
if (cipher->cleanup != NULL) {
cipher->cleanup(cipher);
}
#ifdef HAVE_LIBCRYPTO
if (cipher->ctx != NULL) {
EVP_CIPHER_CTX_free(cipher->ctx);
}
#endif
}
static void cipher_free(struct ssh_cipher_struct *cipher) {