Skip to content

Commit 698ee15

Browse files
committed
Please our mock tests.
1 parent 25275ff commit 698ee15

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Renci.SshNet/ClientAuthentication.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public void Authenticate(IConnectionInfoInternal connectionInfo, ISession sessio
4242
session.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS");
4343
session.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER");
4444
}
45-
4645
}
4746

4847
private static bool TryAuthenticate(ISession session,
@@ -114,9 +113,11 @@ private static List<IAuthenticationMethod> GetAllowedAuthenticationMethodsThatAr
114113

115114
foreach (var supportedAuthenticationMethod in authenticationState.SupportedAuthenticationMethods)
116115
{
116+
var nameOfSupportedAuthenticationMethod = supportedAuthenticationMethod.Name;
117+
117118
for (var i = 0; i < allowedAuthenticationMethods.Length; i++)
118119
{
119-
if (allowedAuthenticationMethods[i] == supportedAuthenticationMethod.Name)
120+
if (allowedAuthenticationMethods[i] == nameOfSupportedAuthenticationMethod)
120121
{
121122
result.Add(supportedAuthenticationMethod);
122123
break;

0 commit comments

Comments
 (0)