1 instantiation of NetEventSource
System.Net.Security (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
38
public static readonly NetEventSource Log = new
NetEventSource
();
236 references to NetEventSource
System.Net.Security (236)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (2)
35
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, _trace);
src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (4)
20
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, "Creating SafeHandle");
25
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, _trace);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
38
public static readonly
NetEventSource
Log = new NetEventSource();
src\libraries\Common\src\System\Net\SafeHandleCache.cs (10)
55
if (
NetEventSource
.Log.IsEnabled())
57
NetEventSource
.Info(this, $"Found cached {handle}.");
85
if (
NetEventSource
.Log.IsEnabled())
87
NetEventSource
.Info(this, $"Discarding {handle} (preferring cached {cached}).");
121
if (
NetEventSource
.Log.IsEnabled())
123
NetEventSource
.Info(this, $"Current size: {_cache.Count}.");
135
if (
NetEventSource
.Log.IsEnabled())
137
NetEventSource
.Info(this, $"Evicting cached {handle}.");
148
if (
NetEventSource
.Log.IsEnabled())
150
NetEventSource
.Info(this, $"New size: {_cache.Count}.");
src\libraries\Common\src\System\Net\Security\SslKeyLogger.cs (2)
34
if (
NetEventSource
.Log.IsEnabled())
36
NetEventSource
.Error(null, $"Failed to open SSL key log file '{s_keyLogFile}': {ex}");
src\libraries\Common\src\System\Net\Security\SSPIHandleCache.cs (2)
34
if (
NetEventSource
.Log.IsEnabled() && !ExceptionCheck.IsFatal(e))
36
NetEventSource
.Error(null, $"Attempted to throw: {e}");
System\Net\CertificateValidationPal.cs (4)
60
if (
NetEventSource
.Log.IsEnabled())
61
NetEventSource
.Info(null, $"storeLocation: {storeLocation} returned store {store}");
80
if (
NetEventSource
.Log.IsEnabled())
81
NetEventSource
.Error(null, SR.Format(SR.net_log_open_store_failed, storeLocation, exception));
System\Net\CertificateValidationPal.Unix.cs (2)
94
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Log.RemoteCertificate(result);
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (4)
228
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, $"package={clientOptions.Package}, spn={_spn}, requiredProtectionLevel={_protectionLevel}");
240
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, SR.net_ntlm_not_possible_default_cred);
System\Net\NegotiateAuthenticationPal.Unix.cs (40)
52
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(null, gex);
75
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(null, gex);
146
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, ex);
194
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, $"Peer SPN-> '{_spn}'");
200
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, "using DefaultCredentials");
205
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_ntlm_not_possible_default_cred);
210
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_nego_not_supported_empty_target_with_defaultcreds);
242
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, $"Peer SPN-> '{_spn}'");
248
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, "using DefaultCredentials");
285
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, $"SSPIWrapper.InitializeSecurityContext() returns statusCode:{statusCode}");
300
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, $"SSPIWrapper.AcceptSecurityContext() returns statusCode:{statusCode}");
326
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, $"need continue _securityContext:{_securityContext}");
511
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, ex);
565
if (
NetEventSource
.Log.IsEnabled())
573
NetEventSource
.Info(this, $"requested protocol = {protocol}, target = {spn}");
632
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, gex);
642
if (
NetEventSource
.Log.IsEnabled())
650
NetEventSource
.Info(this, $"actual protocol = {protocol}");
666
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, ex);
704
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, gex);
719
if (
NetEventSource
.Log.IsEnabled())
722
NetEventSource
.Info(this, $"AcceptSecurityContext: actual protocol = {protocol}");
738
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, ex);
System\Net\Security\NegotiateAuthentication.cs (20)
410
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_log_listener_no_spn_kerberos);
416
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_log_listener_no_spn_disabled);
422
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_log_listener_no_spn_cbt);
428
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_log_listener_no_spns);
438
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_log_listener_no_spn_whensupported);
443
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_log_listener_spn_failed_always);
448
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, SR.net_log_listener_spn, clientSpn);
451
if (
NetEventSource
.Log.IsEnabled())
455
NetEventSource
.Info(this, SR.net_log_listener_spn_passed);
459
NetEventSource
.Info(this, SR.net_log_listener_spn_failed);
463
NetEventSource
.Info(this, SR.net_log_listener_spn_failed_empty);
467
NetEventSource
.Info(this, SR.net_log_listener_spn_failed_dump);
470
NetEventSource
.Info(this, "\t" + serviceName);
System\Net\Security\SslSessionsCache.cs (16)
110
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, $"Not found, Current Cache Count = {s_cachedCreds.Count}");
120
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, $"Not found or invalid, Current Cache Count = {s_cachedCreds.Count}");
124
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, $"Found a cached Handle = {credentials}");
153
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, $"Refused to cache an Invalid Handle {creds}, Current Cache Count = {s_cachedCreds.Count}");
178
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, $"Caching New Handle = {creds}, Current Cache Count = {s_cachedCreds.Count}");
185
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, $"CacheCredential() (locked retry) Found already cached Handle = {credentials}");
191
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, $"CacheCredential() Ignoring incoming handle = {creds} since found already cached Handle = {credentials}");
234
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(null, $"Scavenged cache, New Cache Count = {s_cachedCreds.Count}");
System\Net\Security\SslStream.cs (2)
223
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Log.SslStreamCtor(this, innerStream);
System\Net\Security\SslStream.IO.cs (21)
308
if (
NetEventSource
.Log.IsEnabled())
309
NetEventSource
.Log.SentFrame(this, token.Payload);
353
if (
NetEventSource
.Log.IsEnabled())
354
NetEventSource
.Log.SentFrame(this, payload.Span);
361
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, token.Status);
396
if (
NetEventSource
.Log.IsEnabled())
397
NetEventSource
.Log.SspiSelectedCipherSuite(nameof(ForceAuthenticationAsync),
426
if (
NetEventSource
.Log.IsEnabled() && _lastFrame.AlertDescription != TlsAlertDescription.CloseNotify)
NetEventSource
.Error(this, $"Received TLS alert {_lastFrame.AlertDescription}");
435
TlsFrameHelper.ProcessingOptions options =
NetEventSource
.Log.IsEnabled() ?
448
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, $"Failed to parse TLS hello.");
468
if (
NetEventSource
.Log.IsEnabled())
470
NetEventSource
.Log.ReceivedFrame(this, _lastFrame);
557
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, $"Ignoring unsolicited renegotiated certificate.");
882
if (
NetEventSource
.Log.IsEnabled())
883
NetEventSource
.Info(null, $"***Processing an error Status = {status}");
1026
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, "invalid TLS frame size");
System\Net\Security\SslStream.Protocol.cs (84)
189
if (
NetEventSource
.Log.IsEnabled())
190
NetEventSource
.Log.LocatingPrivateKey(certificate, instance);
201
if (
NetEventSource
.Log.IsEnabled())
202
NetEventSource
.Log.CertIsType2(instance);
239
if (
NetEventSource
.Log.IsEnabled())
241
NetEventSource
.Log.FoundCertInStore(isServer, instance);
273
if (
NetEventSource
.Log.IsEnabled())
274
NetEventSource
.Log.NotFoundCertInStore(instance);
325
if (
NetEventSource
.Log.IsEnabled())
326
NetEventSource
.Log.CertificateFromCertContext(this);
334
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, $"Selected cert = {_selectedClientCertificate}");
339
if (
NetEventSource
.Log.IsEnabled())
340
NetEventSource
.Info(this, "Calling CertificateSelectionCallback");
358
if (
NetEventSource
.Log.IsEnabled())
359
NetEventSource
.Log.CertificateFromDelegate(this);
365
if (
NetEventSource
.Log.IsEnabled())
366
NetEventSource
.Log.NoDelegateNoClientCert(this);
370
if (
NetEventSource
.Log.IsEnabled())
371
NetEventSource
.Log.NoDelegateButClientCert(this);
385
if (
NetEventSource
.Log.IsEnabled())
386
NetEventSource
.Log.AttemptingRestartUsingCert(clientCertificate, this);
395
if (
NetEventSource
.Log.IsEnabled())
399
NetEventSource
.Log.NoIssuersTryAllCerts(this);
403
NetEventSource
.Log.LookForMatchingCerts(issuers.Length, this);
425
if (
NetEventSource
.Log.IsEnabled())
426
NetEventSource
.Info(this, $"Root cert: {certificateEx}");
447
if (
NetEventSource
.Log.IsEnabled())
448
NetEventSource
.Info(this, $"Matched {issuer}");
451
if (
NetEventSource
.Log.IsEnabled())
452
NetEventSource
.Info(this, $"No match: {issuer}");
481
if (
NetEventSource
.Log.IsEnabled())
482
NetEventSource
.Log.SelectedCert(_sslAuthenticationOptions.ClientCertificates[i], this);
490
if (
NetEventSource
.Log.IsEnabled())
494
NetEventSource
.Log.CertsAfterFiltering(filteredCerts.Count, this);
495
NetEventSource
.Log.FindingMatchingCerts(this);
499
NetEventSource
.Log.CertsAfterFiltering(0, this);
500
NetEventSource
.Info(this, "No client certificate to choose from");
528
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Info(this, $"Selected cert = {selectedCert}");
618
if (
NetEventSource
.Log.IsEnabled())
619
NetEventSource
.Info(this, "Reset to anonymous session.");
637
if (
NetEventSource
.Log.IsEnabled())
638
NetEventSource
.Log.UsingCachedCredential(this);
688
if (
NetEventSource
.Log.IsEnabled())
689
NetEventSource
.Error(this, $"ServerCertSelectionDelegate returned no certificaete for '{_sslAuthenticationOptions.TargetHost}'.");
693
if (
NetEventSource
.Log.IsEnabled())
694
NetEventSource
.Info(this, "ServerCertSelectionDelegate selected Cert");
704
if (
NetEventSource
.Log.IsEnabled())
705
NetEventSource
.Error(this, $"CertSelectionDelegate returned no certificaete for '{_sslAuthenticationOptions.TargetHost}'.");
709
if (
NetEventSource
.Log.IsEnabled())
710
NetEventSource
.Info(this, "CertSelectionDelegate selected Cert");
723
if (
NetEventSource
.Log.IsEnabled())
724
NetEventSource
.Error(this, "Certiticate callback returned no certificaete.");
820
if (
NetEventSource
.Log.IsEnabled())
824
NetEventSource
.Error(this, $"Authentication failed. Status: {token.Status}, Exception message: {token.GetException()!.Message}");
918
if (
NetEventSource
.Log.IsEnabled())
919
NetEventSource
.Info(this, "InitializeSecurityContext() returned 'CredentialsNeeded'.");
992
if (
NetEventSource
.Log.IsEnabled())
996
NetEventSource
.Info(this, $"TLS resumed {_connectionInfo.TlsResumed}");
1003
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.DumpBuffer(this, buffer.Span);
1013
if (
NetEventSource
.Log.IsEnabled())
NetEventSource
.Error(this, $"ERROR {token.Status}");
1022
if (
NetEventSource
.Log.IsEnabled() && status.ErrorCode == SecurityStatusPalErrorCode.OK)
1024
NetEventSource
.DumpBuffer(this, buffer.Slice(outputOffset, outputCount));
1063
if (
NetEventSource
.Log.IsEnabled() && RemoteCertRequired)
NetEventSource
.Error(this, $"Remote certificate required, but no remote certificate received");
1123
if (
NetEventSource
.Log.IsEnabled())
1126
NetEventSource
.Info(this, $"Cert validation, remote cert = {_remoteCertificate}");
1179
if (
NetEventSource
.Log.IsEnabled())
1180
NetEventSource
.Info(this, $"alertMessage:{alertMessage}");
1187
if (
NetEventSource
.Log.IsEnabled())
1188
NetEventSource
.Info(this, $"ApplyAlertToken() returned {status.ErrorCode}");
1206
if (
NetEventSource
.Log.IsEnabled())
1207
NetEventSource
.Info(this, $"ApplyAlertToken() returned {status.ErrorCode}");
1276
if (!
NetEventSource
.Log.IsEnabled())
1281
NetEventSource
.Log.RemoteCertificateError(this, SR.net_log_remote_cert_has_errors);
1284
NetEventSource
.Log.RemoteCertificateError(this, SR.net_log_remote_cert_not_available);
1289
NetEventSource
.Log.RemoteCertificateError(this, SR.net_log_remote_cert_name_mismatch);
1299
NetEventSource
.Log.RemoteCertificateError(this, chainStatusString);
1307
NetEventSource
.Log.RemoteCertDeclaredValid(this);
1311
NetEventSource
.Log.RemoteCertHasNoErrors(this);
1318
NetEventSource
.Log.RemoteCertUserDeclaredInvalid(this);
System\Net\Security\SslStreamCertificateContext.cs (4)
80
if (!chainStatus &&
NetEventSource
.Log.IsEnabled())
82
NetEventSource
.Error(null, $"Failed to build chain for {target.Subject}");
93
if (!chainStatus &&
NetEventSource
.Log.IsEnabled())
95
NetEventSource
.Error(null, $"Failed to build chain for {target.Subject} while trusting additional certificates");
System\Net\Security\SslStreamCertificateContext.Linux.cs (18)
135
if (
NetEventSource
.Log.IsEnabled())
137
NetEventSource
.Info(this, $"Got OCSP response.");
146
if (
NetEventSource
.Log.IsEnabled())
148
NetEventSource
.Info(this, "No OCSP response available.");
164
if (
NetEventSource
.Log.IsEnabled())
166
NetEventSource
.Info(this, "Cached OCSP response expired, fetching fresh staple.");
173
if (
NetEventSource
.Log.IsEnabled())
175
NetEventSource
.Info(this, "Starting async refresh of OCSP staple");
207
if (
NetEventSource
.Log.IsEnabled())
209
NetEventSource
.Info(this, $"Pending download task exists.");
248
if (
NetEventSource
.Log.IsEnabled())
250
NetEventSource
.Info(this, $"Starting new OCSP download task.");
334
if (
NetEventSource
.Log.IsEnabled())
336
NetEventSource
.Info(this, $"Received {ret.Length} B OCSP response, Expiration: {_ocspExpiration}, Next refresh: {_nextDownload}");
357
if (
NetEventSource
.Log.IsEnabled())
359
NetEventSource
.Info(this, $"OCSP response fetch failed, backing off, Next refresh = {_nextDownload}");
368
if (
NetEventSource
.Log.IsEnabled())
370
NetEventSource
.Error(this, $"OCSP refresh failed: {ex}");