openssl: do not ignore failure of EVP_CipherInit()

This commit is contained in:
Kamil Dudka 2012-09-10 15:59:16 +02:00
parent 43b730ce56
commit bfbb5a4dc7

View File

@ -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