Definition at line 19 of file CertificateHelper.cs.
20 {
21 if (candidateCerts.
Count == 0)
22 {
23 return null;
24 }
26 {
28 {
30 {
31 System.
Net.
NetEventSource.
Info(candidateCerts, $
"Skipping current X509Certificate2 {candidateCert.GetHashCode()} since it doesn't have private key. Certificate Subject: {candidateCert.Subject}, Thumbprint: {candidateCert.Thumbprint}.",
"GetEligibleClientCertificate");
32 }
33 }
35 {
37 {
38 System.
Net.
NetEventSource.
Info(candidateCerts, $
"Choosing X509Certificate2 {candidateCert.GetHashCode()} as the Client Certificate. Certificate Subject: {candidateCert.Subject}, Thumbprint: {candidateCert.Thumbprint}.",
"GetEligibleClientCertificate");
39 }
40 return candidateCert;
41 }
42 }
44 {
46 }
47 return null;
48 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static bool IsValidClientCertificate(X509Certificate2 cert)
References System.Collections.CollectionBase.Count, System.Security.Cryptography.X509Certificates.X509Certificate2.HasPrivateKey, System.Net.NetEventSource.Info(), System.Net.Security.CertificateHelper.IsValidClientCertificate(), and System.Net.NetEventSource.Log.