libssh2_org/libssh2_org-ETM-remote.patch

27 lines
990 B
Diff
Raw Normal View History

From bde10825f1271769d56a0e99793da61d37abc23c Mon Sep 17 00:00:00 2001
From: Josef Cejka <jcejka@suse.com>
Date: Thu, 28 Mar 2024 23:38:47 +0100
Subject: [PATCH] transport: check ETM on remote end when receiving (#1332)
We should check if encrypt-then-MAC feature is enabled in remote end's
configuration.
Fixes #1331
---
src/transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/transport.c b/src/transport.c
index 531f5aa15a..af175d3fa1 100644
--- a/src/transport.c
+++ b/src/transport.c
@@ -425,7 +425,7 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session)
make the checks below work fine still */
}
- etm = encrypted && session->local.mac ? session->local.mac->etm : 0;
+ etm = encrypted && session->remote.mac ? session->remote.mac->etm : 0;
/* read/use a whole big chunk into a temporary area stored in
the LIBSSH2_SESSION struct. We will decrypt data from that