From 3f47e668359c6afda6807be86e2bf93596611126 Mon Sep 17 00:00:00 2001 From: Jeremy Norris Date: Wed, 8 Sep 2021 14:54:38 -0500 Subject: [PATCH] Fix bug where ext-info-c was incorrectly advertised during rekeying. According to RFC 8308 section 2.1, ext-info-c should only advertised during the first key exchange. --- src/main/java/com/jcraft/jsch/Session.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/jcraft/jsch/Session.java b/src/main/java/com/jcraft/jsch/Session.java index 80d807a7..205d70d9 100644 --- a/src/main/java/com/jcraft/jsch/Session.java +++ b/src/main/java/com/jcraft/jsch/Session.java @@ -701,7 +701,7 @@ private void send_kexinit() throws Exception { } String enable_server_sig_algs=getConfig("enable_server_sig_algs"); - if(enable_server_sig_algs.equals("yes")){ + if(enable_server_sig_algs.equals("yes") && !isAuthed){ kex+=",ext-info-c"; }