Let a session's transport say what it negotiated

ISshConnection and ISftpSession both carry Cipher now — the server-to-client
algorithm off SSH.NET's own ConnectionInfo, captured once because a rekey is
not an event that library raises — and TerminalWorkspace.GetSessionFacts hands
that plus the host key's algorithm back per session, without ever handing over
the connection itself. Nothing reads either yet; the status bar that will is
the next commit.
This commit is contained in:
2026-08-08 20:54:14 +02:00
parent 8915650a0d
commit 8209f15741
10 changed files with 134 additions and 0 deletions
+11
View File
@@ -265,6 +265,17 @@ public interface ISftpSession : IRemoteFileStore
{
/// <summary>The host key that was accepted for this session.</summary>
HostKeyPresentation HostKey { get; }
/// <summary>
/// The negotiated server-to-client encryption algorithm, e.g. <c>aes256-gcm@openssh.com</c>.
/// </summary>
/// <remarks>
/// The same fact <see cref="ISshConnection.Cipher"/> is, read the same way — off SSH.NET's
/// <c>ConnectionInfo.CurrentServerEncryption</c> once the handshake this session's own connect performed
/// has finished — and for the same reason: <c>SftpClient</c> derives from <c>BaseClient</c> exactly as
/// <c>SshClient</c> does, and rekeys are no more visible here than they are there. See that member's remark.
/// </remarks>
string Cipher { get; }
}
/// <summary>