]> tinc-vpn.org Git - tinc/blobdiff - src/openssl/cipher.c
fix: use EVP_DecryptUpdate while decrypting
[tinc] / src / openssl / cipher.c
index d51ec0d5cedd696b75a2d47cdad8472163d08642..974fbeb2e9966e1d189fa6c7737aa63aa1e1a025 100644 (file)
@@ -189,7 +189,7 @@ bool cipher_decrypt(cipher_t *cipher, const void *indata, size_t inlen, void *ou
        } else {
                int len;
 
-               if(EVP_EncryptUpdate(cipher->ctx, outdata, &len, indata, inlen)) {
+               if(EVP_DecryptUpdate(cipher->ctx, outdata, &len, indata, inlen)) {
                        if(outlen) {
                                *outlen = len;
                        }