Description: Fix EVP_EncryptUpdate use (use EVP_DecryptUpdate)
Author: Don Armstrong <don@debian.org>
Origin: https://www.tinc-vpn.org/pipermail/tinc-devel/2019-February/000941.html
Last-Update: 2020-05-31

--- tinc-1.1~pre17.orig/src/openssl/cipher.c
+++ tinc-1.1~pre17/src/openssl/cipher.c
@@ -189,7 +189,7 @@ bool cipher_decrypt(cipher_t *cipher, co
 	} 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;
 			}
