Explorar o código

Add HostKeyName property to HostKeyEventArgs

olegkap_cp %!s(int64=13) %!d(string=hai) anos
pai
achega
78634e3b1c
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      Renci.SshClient/Renci.SshNet/Common/HostKeyEventArgs.cs

+ 7 - 0
Renci.SshClient/Renci.SshNet/Common/HostKeyEventArgs.cs

@@ -25,6 +25,11 @@ namespace Renci.SshNet.Common
         /// </summary>
         public byte[] HostKey { get; private set; }
 
+        /// <summary>
+        /// Gets the host key name.
+        /// </summary>
+        public string HostKeyName{ get; private set; }
+
         /// <summary>
         /// Gets the finger print.
         /// </summary>
@@ -48,6 +53,8 @@ namespace Renci.SshNet.Common
 
             this.HostKey = host.Data;
 
+            this.HostKeyName = host.Name;
+
             this.KeyLength = host.Key.KeyLength;
 
             using (var md5 = new MD5Hash())