From bfbb5a4dc75c04b3532063c03b80796dd6d69da4 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 10 Sep 2012 15:59:16 +0200 Subject: [PATCH] openssl: do not ignore failure of EVP_CipherInit() --- src/openssl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openssl.c b/src/openssl.c index 481982cb..c61cb0e2 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -175,8 +175,7 @@ _libssh2_cipher_init(_libssh2_cipher_ctx * h, unsigned char *iv, unsigned char *secret, int encrypt) { EVP_CIPHER_CTX_init(h); - EVP_CipherInit(h, algo(), secret, iv, encrypt); - return 0; + return !EVP_CipherInit(h, algo(), secret, iv, encrypt); } int