Skip to content

Commit

Permalink
Reapply changes after merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Engel committed Jun 11, 2024
1 parent 69c2fcb commit 73fbd5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ internal class SNICommon
/// <returns>True if certificate is valid</returns>
internal static bool ValidateSslServerCertificate(Guid connectionId, string targetServerName, string hostNameInCertificate, X509Certificate serverCert, string validationCertFileName, SslPolicyErrors policyErrors)
{
using (TrySNIEventScope.Create("SNICommon.ValidateSslServerCertificate | SNI | SCOPE | INFO | Entering Scope {0} "))
using (TrySNIEventScope.Create(nameof(SNICommon)))
{
if (policyErrors == SslPolicyErrors.None)
{
Expand Down Expand Up @@ -292,7 +292,7 @@ internal static bool ValidateSslServerCertificate(Guid connectionId, string targ

internal static IPAddress[] GetDnsIpAddresses(string serverName, TimeoutTimer timeout)
{
using (TrySNIEventScope.Create(nameof(GetDnsIpAddresses)))
using (TrySNIEventScope.Create(nameof(SNICommon)))
{
int remainingTimeout = timeout.MillisecondsRemainingInt;
SqlClientEventSource.Log.TrySNITraceEvent(nameof(SNICommon), EventType.INFO,
Expand All @@ -310,7 +310,7 @@ internal static IPAddress[] GetDnsIpAddresses(string serverName, TimeoutTimer ti

internal static IPAddress[] GetDnsIpAddresses(string serverName)
{
using (TrySNIEventScope.Create(nameof(GetDnsIpAddresses)))
using (TrySNIEventScope.Create(nameof(SNICommon)))
{
SqlClientEventSource.Log.TrySNITraceEvent(nameof(SNICommon), EventType.INFO, "Getting DNS host entries for serverName {0}.", args0: serverName);
return Dns.GetHostAddresses(serverName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ internal override void GenerateSspiClientContext(ReadOnlyMemory<byte> received,
_negotiateAuth ??= new(new NegotiateAuthenticationClientOptions { Package = "Negotiate", TargetName = Encoding.Unicode.GetString(_sniSpnBuffer[i]) });
sendBuff = _negotiateAuth.GetOutgoingBlob(received.Span, out statusCode)!;
// Log session id, status code and the actual SPN used in the negotiation
SqlClientEventSource.Log.TryTraceEvent("TdsParserStateObjectManaged.GenerateSspiClientContext | Info | Session Id {0}, StatusCode={1}, SPN={2}", _physicalStateObj.SessionId, statusCode, _negotiateAuth.TargetName);
SqlClientEventSource.Log.TryTraceEvent("{0}.{1} | Info | Session Id {2}, StatusCode={3}, SPN={4}", nameof(NegotiateSSPIContextProvider),
nameof(GenerateSspiClientContext), _physicalStateObj.SessionId, statusCode, _negotiateAuth.TargetName);
if (statusCode == NegotiateAuthenticationStatusCode.Completed || statusCode == NegotiateAuthenticationStatusCode.ContinueNeeded)
break; // Successful case, exit the loop with current SPN.
else
Expand Down

0 comments on commit 73fbd5c

Please sign in to comment.