Skip to content

Commit 3c7ffed

Browse files
committed
Fail auth if init blob is null
1 parent 86a38b8 commit 3c7ffed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Renci.SshNet/GssApiAuthenticationMethod.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ public override AuthenticationResult Authenticate(Session session)
9191
_authenticationContext = new ReflectedNegotiateContext(_credential.DelegateCredential, networkCredential, targetName);
9292
#endif
9393
var outgoingBlob = _authenticationContext.GetOutgoingBlob(Array.Empty<byte>(), out var statusCode);
94+
95+
if (outgoingBlob == null)
96+
{
97+
return AuthenticationResult.Failure;
98+
}
99+
94100
var tokenMessage = new GssApiTokenMessage { Token = outgoingBlob };
95101

96102
session.UserAuthenticationFailureReceived += Session_UserAuthenticationFailureReceived;

0 commit comments

Comments
 (0)