You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Implement OpenSSH strict key exchange extension
* The pseudo-algorithm
is only valid in the initial SSH2_MSG_KEXINIT and MUST be ignored
if they are present in subsequent SSH2_MSG_KEXINIT packets.
* Only send strict kex pseudo algorithm for the first kex.
Strictly disable non-kex massages in strict kex mode.
* Unit tests for strict kex
* More unit tests
* More unit tests
* Correct file name
* Update SessionTest_ConnectingBase.cs
* More unit tests
* Delete SessionTest_Connecting_ServerSendsMaxIgnoreMessagesBeforeKexInit.cs
* Add a comment about throwing exception when inbound sequence number is about to wrap during init kex.
* Delete SessionTest_Connecting_ServerSendsDebugMessageAfterKexInit_NoStrictKex.cs
* Fix build
* Update test/Renci.SshNet.Tests/Classes/SessionTest_Connected.cs
---------
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
Copy file name to clipboardExpand all lines: src/Renci.SshNet/SshMessageFactory.cs
+28-3Lines changed: 28 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -115,16 +115,41 @@ public Message Create(byte messageNumber)
115
115
returnenabledMessageMetadata.Create();
116
116
}
117
117
118
-
publicvoidDisableNonKeyExchangeMessages()
118
+
/// <summary>
119
+
/// Disables non-KeyExchange messages.
120
+
/// </summary>
121
+
/// <param name="strict">
122
+
/// <see langword="true"/> to indicate the strict key exchange mode; otherwise <see langword="false"/>.
123
+
/// <para>In strict key exchange mode, only below messages are allowed:</para>
124
+
/// <list type="bullet">
125
+
/// <item>SSH_MSG_KEXINIT -> 20</item>
126
+
/// <item>SSH_MSG_NEWKEYS -> 21</item>
127
+
/// <item>SSH_MSG_DISCONNECT -> 1</item>
128
+
/// </list>
129
+
/// <para>Note:</para>
130
+
/// <para> The relevant KEX Reply MSG will be allowed from a sub class of KeyExchange class.</para>
131
+
/// <para> For example, it calls <c>Session.RegisterMessage("SSH_MSG_KEX_ECDH_REPLY");</c> if the curve25519-sha256 KEX algorithm is selected per negotiation.</para>
0 commit comments