Skip to content

Commit 3ca3de6

Browse files
committed
copy locally
1 parent 6a83456 commit 3ca3de6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ internal sealed class NegotiateSspiContextProvider : SspiContextProvider, IDispo
1515

1616
protected override bool GenerateSspiClientContext(ReadOnlySpan<byte> incomingBlob, IBufferWriter<byte> outgoingBlobWriter, SspiAuthenticationParameters authParams)
1717
{
18-
NegotiateAuthenticationStatusCode statusCode = NegotiateAuthenticationStatusCode.UnknownCredentials;
19-
20-
_negotiateAuth = GetNegotiateAuthenticationForParams(authParams);
21-
22-
var sendBuff = _negotiateAuth.GetOutgoingBlob(incomingBlob, out statusCode)!;
18+
var negotiateAuth = GetNegotiateAuthenticationForParams(authParams);
19+
var sendBuff = negotiateAuth.GetOutgoingBlob(incomingBlob, out var statusCode)!;
2320

2421
// Log session id, status code and the actual SPN used in the negotiation
2522
SqlClientEventSource.Log.TryTraceEvent("{0}.{1} | Info | Session Id {2}, StatusCode={3}, SPN={4}", nameof(NegotiateSspiContextProvider),
26-
nameof(GenerateSspiClientContext), _physicalStateObj.SessionId, statusCode, _negotiateAuth.TargetName);
23+
nameof(GenerateSspiClientContext), _physicalStateObj.SessionId, statusCode, negotiateAuth.TargetName);
2724

2825
if (statusCode == NegotiateAuthenticationStatusCode.Completed || statusCode == NegotiateAuthenticationStatusCode.ContinueNeeded)
2926
{

0 commit comments

Comments
 (0)