Skip to content

Commit a1703d8

Browse files
committed
inline
1 parent a49abc3 commit a1703d8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/NegotiateSSPIContextProvider.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ internal sealed class NegotiateSSPIContextProvider : SSPIContextProvider
1313
{
1414
protected override void GenerateSspiClientContext(ReadOnlySpan<byte> incomingBlob, IBufferWriter<byte> outgoingBlobWriter, byte[][] _sniSpnBuffer)
1515
{
16-
NegotiateAuthenticationStatusCode statusCode = NegotiateAuthenticationStatusCode.UnknownCredentials;
17-
1816
for (int i = 0; i < _sniSpnBuffer.Length; i++)
1917
{
2018
var negotiateAuth = new NegotiateAuthentication(new NegotiateAuthenticationClientOptions { Package = "Negotiate", TargetName = Encoding.Unicode.GetString(_sniSpnBuffer[i]) });
21-
var sendBuff = negotiateAuth.GetOutgoingBlob(incomingBlob, out statusCode)!;
19+
var sendBuff = negotiateAuth.GetOutgoingBlob(incomingBlob, out var statusCode)!;
2220

2321
// Log session id, status code and the actual SPN used in the negotiation
2422
SqlClientEventSource.Log.TryTraceEvent("{0}.{1} | Info | Session Id {2}, StatusCode={3}, SPN={4}", nameof(NegotiateSSPIContextProvider),
@@ -31,7 +29,7 @@ protected override void GenerateSspiClientContext(ReadOnlySpan<byte> incomingBlo
3129
}
3230
}
3331

34-
throw new InvalidOperationException(SQLMessage.SSPIGenerateError() + Environment.NewLine + statusCode);
32+
throw new InvalidOperationException(SQLMessage.SSPIGenerateError());
3533
}
3634
}
3735
}

0 commit comments

Comments
 (0)