public void CanTrustTest() { KeyHostAlgorithm host = null; // TODO: Initialize to an appropriate value HostKeyEventArgs target = new HostKeyEventArgs(host); // TODO: Initialize to an appropriate value bool expected = false; // TODO: Initialize to an appropriate value bool actual; target.CanTrust = expected; actual = target.CanTrust; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
private void Session_HostKeyReceived(object sender, HostKeyEventArgs e) { var handler = HostKeyReceived; if (handler != null) { handler(this, e); } }
/// <summary> /// Determines whether the specified host key can be trusted. /// </summary> /// <param name="host">The host algorithm.</param> /// <returns> /// <c>true</c> if the specified host can be trusted; otherwise, <c>false</c>. /// </returns> protected bool CanTrustHostKey(KeyHostAlgorithm host) { var args = new HostKeyEventArgs(host); if (this.HostKeyReceived != null) { this.HostKeyReceived(this, args); } return args.CanTrust; }
/// <summary> /// Determines whether the specified host key can be trusted. /// </summary> /// <param name="host">The host algorithm.</param> /// <returns> /// <c>true</c> if the specified host can be trusted; otherwise, <c>false</c>. /// </returns> protected bool CanTrustHostKey(KeyHostAlgorithm host) { var handlers = HostKeyReceived; if (handlers != null) { var args = new HostKeyEventArgs(host); handlers(this, args); return args.CanTrust; } return true; }
private void sftp_HostKeyReceived(object sender, HostKeyEventArgs e) { LogDelegate("[SFTP] HostKeyReceived : " + e.HostKeyName + " " + e.HostKey); }
private void Session_HostKeyReceived(object sender, HostKeyEventArgs e) { if (this.HostKeyReceived != null) { this.HostKeyReceived(this, e); } }
public void HostKeyEventArgsConstructorTest() { KeyHostAlgorithm host = null; // TODO: Initialize to an appropriate value HostKeyEventArgs target = new HostKeyEventArgs(host); Assert.Inconclusive("TODO: Implement code to verify target"); }
private void SshClient_HostKeyReceived(object sender, Renci.SshNet.Common.HostKeyEventArgs e) { Info("Host key fingerprint is: {0} {1}.", e.HostKeyName, BitConverter.ToString(e.FingerPrint).Replace('-', ':').ToLower()); }
private void M_Client_HostKeyReceived(object sender, Renci.SshNet.Common.HostKeyEventArgs e) { e.CanTrust = e.FingerPrint.SequenceEqual(m_fingerprint) ? true : false; }
/// <summary> /// An event handler called when the host key was received for the current SSH connection. /// </summary> /// <param name="sender">The sender object.</param> /// <param name="e">The event arguments.</param> private void OnSshHostKeyReceived(object sender, HostKeyEventArgs e) { // Execute the code on the UI thread. this.Invoke(() => { this.OnHostKeyReceivedInternal(e); }); }
/// <summary> /// An action called when receiving the key from the remote host. /// </summary> /// <param name="args">The arguments.</param> private void OnHostKeyReceivedInternal(HostKeyEventArgs args) { // Call the event handler. this.OnHostKeyReceived(this.client.ConnectionInfo, args); }
/// <summary> /// An event handler called when receiving a key from the remote host. /// </summary> /// <param name="info">The connection info.</param> /// <param name="args">The event arguments.</param> protected virtual void OnHostKeyReceived(ConnectionInfo info, HostKeyEventArgs args) { }
/// <summary> /// An event handler called when receiving a key from the remote host. /// </summary> /// <param name="info">The connection info.</param> /// <param name="args">The event arguments.</param> protected override void OnHostKeyReceived(ConnectionInfo info, HostKeyEventArgs args) { // Log this.log.Add(this.config.Api.Log( LogEventLevel.Verbose, LogEventType.Information, "The client connected to the SSH server \'{0}\' received key \'{1}\' of {2} bits. Key: {3}. Fingerprint: {4}.", new object[] { info.Host, args.HostKeyName, args.KeyLength, args.HostKey, args.FingerPrint })); }
/// <summary> /// An event handler called when receiving a key from the remote host. /// </summary> /// <param name="info">The connection info.</param> /// <param name="args">The event arguments.</param> protected override void OnHostKeyReceived(ConnectionInfo info, HostKeyEventArgs args) { // Log this.log.Add(this.crawler.Log.Add( LogEventLevel.Verbose, LogEventType.Information, ControlSession.logSource, "The client connected to the PlanetLab node \'{0}\' received key \'{1}\' of {2} bits. Key: {3}. Fingerprint: {4}.", new object[] { info.Host, args.HostKeyName, args.KeyLength, args.HostKey, args.FingerPrint })); }