X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fcipher.c;h=98033c5e692057986ba010e1ad176a4474be2f27;hb=refs%2Ftags%2Frelease-1.1pre15;hp=e362325a36c6988efffcf6d60852900978884268;hpb=979acc48aded5bb04f1574128d174d56550be302;p=tinc diff --git a/src/openssl/cipher.c b/src/openssl/cipher.c index e362325a..98033c5e 100644 --- a/src/openssl/cipher.c +++ b/src/openssl/cipher.c @@ -1,6 +1,6 @@ /* cipher.c -- Symmetric block cipher handling - Copyright (C) 2007-2016 Guus Sliepen + Copyright (C) 2007-2017 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -137,7 +137,7 @@ bool cipher_encrypt(cipher_t *cipher, const void *indata, size_t inlen, void *ou int len, pad; if(EVP_EncryptInit_ex(cipher->ctx, NULL, NULL, NULL, NULL) && EVP_EncryptUpdate(cipher->ctx, (unsigned char *)outdata, &len, indata, inlen) - && EVP_EncryptFinal(cipher->ctx, (unsigned char *)outdata + len, &pad)) { + && EVP_EncryptFinal_ex(cipher->ctx, (unsigned char *)outdata + len, &pad)) { if(outlen) *outlen = len + pad; return true; } @@ -158,7 +158,7 @@ bool cipher_decrypt(cipher_t *cipher, const void *indata, size_t inlen, void *ou int len, pad; if(EVP_DecryptInit_ex(cipher->ctx, NULL, NULL, NULL, NULL) && EVP_DecryptUpdate(cipher->ctx, (unsigned char *)outdata, &len, indata, inlen) - && EVP_DecryptFinal(cipher->ctx, (unsigned char *)outdata + len, &pad)) { + && EVP_DecryptFinal_ex(cipher->ctx, (unsigned char *)outdata + len, &pad)) { if(outlen) *outlen = len + pad; return true; }