Renci.SshNet.Security.KeyExchange.CanTrustHostKey C# (CSharp) Method

CanTrustHostKey() protected method

Determines whether the specified host key can be trusted.
protected CanTrustHostKey ( KeyHostAlgorithm host ) : bool
host KeyHostAlgorithm The host algorithm.
return bool
        protected bool CanTrustHostKey(KeyHostAlgorithm host)
        {
            var handlers = HostKeyReceived;
            if (handlers != null)
            {
                var args = new HostKeyEventArgs(host);
                handlers(this, args);
                return args.CanTrust;
            }

            return true;
        }