From 807259a016cc3bc991479ec33ec4d354b519589a Mon Sep 17 00:00:00 2001 From: olegkap_cp Date: Mon, 7 Jan 2013 14:28:50 +0000 Subject: [PATCH] Apply 13574 patch --- Renci.SshClient/Renci.SshNet/ConnectionInfo.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Renci.SshClient/Renci.SshNet/ConnectionInfo.cs b/Renci.SshClient/Renci.SshNet/ConnectionInfo.cs index a7e84152..4966bbec 100644 --- a/Renci.SshClient/Renci.SshNet/ConnectionInfo.cs +++ b/Renci.SshClient/Renci.SshNet/ConnectionInfo.cs @@ -213,7 +213,7 @@ namespace Renci.SshNet // TODO: DOCS Add exception documentation for this class. /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Connection host. /// Connection port. @@ -224,11 +224,11 @@ namespace Renci.SshNet /// The proxy username. /// The proxy password. /// The authentication methods. - /// is invalid, or is null or contains whitespace characters. - /// - /// is not within and . - /// - /// is null or empty. + /// host + /// proxyPort + /// is invalid, or is null or contains whitespace characters. + /// is not within and . + /// is invalid, or is null or contains whitespace characters. public ConnectionInfo(string host, int port, string username, ProxyTypes proxyType, string proxyHost, int proxyPort, string proxyUsername, string proxyPassword, params AuthenticationMethod[] authenticationMethods) { if (!host.IsValidHost()) @@ -380,11 +380,11 @@ namespace Renci.SshNet { // Find first authentication method var method = this.AuthenticationMethods.Where((a) => allowedAuthentications.Contains(a.Name) && !triedAuthentications.Contains(a.Name)).FirstOrDefault(); - triedAuthentications.Add(method.Name); - if (method == null) throw new SshAuthenticationException("No suitable authentication method found to complete authentication."); + triedAuthentications.Add(method.Name); + authenticated = method.Authenticate(session); if (authenticated == AuthenticationResult.PartialSuccess)