1 type derived from X509Certificate
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
17public class X509Certificate2 : X509Certificate
5 instantiations of X509Certificate
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HttpConnectionTests.cs (1)
94var clientCertificate = new X509Certificate(Array.Empty<byte>());
Microsoft.AspNetCore.SignalR.Tests (1)
WebSocketsTransportTests.cs (1)
34var clientCertificate = new X509Certificate(Array.Empty<byte>());
Microsoft.Build.Tasks.Core (1)
BootstrapperUtil\BootstrapperBuilder.cs (1)
2162using var cert = new X509Certificate(fileSource);
System.Security.Cryptography (2)
System\Security\Cryptography\X509Certificates\X509Certificate.cs (2)
233return new X509Certificate(filename); 240return new X509Certificate(filename);
154 references to X509Certificate
dotnet-dev-certs (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
861/// <see cref="X509Certificate.Equals(X509Certificate?)"/> is not adequate for security purposes.
dotnet-svcutil-lib (13)
CmdCredentialsProvider.cs (7)
129public X509Certificate GetCertificate(Uri serviceUri) 139private Dictionary<string, X509Certificate> _validatedClientCerts = new Dictionary<string, X509Certificate>(); 206private bool ValidateServerCertificate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslPolicyErrors) 221private bool PromptUserOnInvalidCert(X509Certificate cert, SslPolicyErrors sslPolicyErrors) 247private static string FormatCertificate(X509Certificate cert, string certId = null) 309public static string GetCertHashString(this X509Certificate cert)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (4)
391private bool ValidateRemoteCertificate(object sender, X509Certificate certificate, X509Chain chain, 630private static X509Certificate SelectClientCertificate(object sender, string targetHost, 631X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssuers) 636private bool ValidateRemoteCertificate(object sender, X509Certificate certificate, X509Chain chain,
Metadata\IClientCertificateProvider.cs (1)
12X509Certificate GetCertificate(Uri serviceUri);
Metadata\MetadaExchangeResolver.cs (1)
33private X509Certificate _clientCertificate;
InMemory.FunctionalTests (3)
HttpsConnectionMiddlewareTests.cs (2)
859var c = (X509Certificate)list[i];
src\Servers\Kestrel\shared\test\CertHelper.cs (1)
41public static bool AllowAnyServerCertificate(object sender, X509Certificate certificate, X509Chain chain)
Interop.FunctionalTests (1)
Http3\Http3TlsTests.cs (1)
482RemoteCertificateValidationCallback = (object _sender, X509Certificate actualCertificate, X509Chain _chain, SslPolicyErrors _sslPolicyErrors) =>
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
861/// <see cref="X509Certificate.Equals(X509Certificate?)"/> is not adequate for security purposes.
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
HttpsTests.cs (1)
265X509Certificate cert = null)
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Internal\TlsConnectionFeature.cs (1)
115private static X509Certificate2? ConvertToX509Certificate2(X509Certificate? certificate)
Middleware\HttpsConnectionMiddleware.cs (4)
378X509Certificate? certificate, 412private bool RemoteCertificateValidationCallback(object sender, X509Certificate? certificate, X509Chain? chain, SslPolicyErrors sslPolicyErrors) 480private static X509Certificate2? ConvertToX509Certificate2(X509Certificate? certificate) 573= (object sender, X509Certificate? certificate, X509Chain? chain, SslPolicyErrors sslPolicyErrors) =>
src\Shared\CertificateGeneration\CertificateManager.cs (2)
861/// <see cref="X509Certificate.Equals(X509Certificate?)"/> is not adequate for security purposes.
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\CertHelper.cs (1)
41public static bool AllowAnyServerCertificate(object sender, X509Certificate certificate, X509Chain chain)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionContext.FeatureCollection.cs (1)
47private static X509Certificate2? ConvertToX509Certificate2(X509Certificate? certificate)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
QuicTestHelpers.cs (1)
114private static bool RemoteCertificateValidationCallback(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HttpConnectionTests.cs (1)
94var clientCertificate = new X509Certificate(Array.Empty<byte>());
Microsoft.AspNetCore.SignalR.Tests (1)
WebSocketsTransportTests.cs (1)
34var clientCertificate = new X509Certificate(Array.Empty<byte>());
Microsoft.Build.Tasks.Core (1)
BootstrapperUtil\BootstrapperBuilder.cs (1)
2162using var cert = new X509Certificate(fileSource);
Microsoft.DotNet.SignTool (1)
src\VerifySignatures.cs (1)
180X509Certificate signer = X509Certificate2.CreateFromSignedFile(fullPath);
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
935[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.X509Certificate))]
netstandard (1)
netstandard.cs (1)
1954[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.X509Certificate))]
ReachFramework (8)
packaging\XpsDigitalSignature.cs (3)
184X509Certificate 276Verify(X509Certificate certificate) 300VerifyCertificate(X509Certificate certificate)
Packaging\XpsDocument.cs (4)
369X509Certificate certificate, 406X509Certificate certificate, 447X509Certificate certificate, 836X509Certificate certificate,
Packaging\XpsManager.cs (1)
860X509Certificate certificate,
System.DirectoryServices.Protocols (2)
artifacts\obj\System.DirectoryServices.Protocols\Debug\net10.0\System.DirectoryServices.Protocols.notsupported.cs (2)
491public delegate System.Security.Cryptography.X509Certificates.X509Certificate QueryClientCertificateCallback(System.DirectoryServices.Protocols.LdapConnection connection, byte[][] trustedCAs); 751public delegate bool VerifyServerCertificateCallback(System.DirectoryServices.Protocols.LdapConnection connection, System.Security.Cryptography.X509Certificates.X509Certificate certificate);
System.Net.Http (2)
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (2)
31ForSocketsHttpHandler = (object sender, X509Certificate? certificate, X509Chain? chain, SslPolicyErrors sslPolicyErrors) => 46sslOptions.RemoteCertificateValidationCallback = (object sender, X509Certificate? certificate, X509Chain? chain, SslPolicyErrors sslPolicyErrors) =>
System.Net.HttpListener (4)
System\Net\Managed\HttpConnection.cs (2)
62private readonly X509Certificate _cert; 74public HttpConnection(Socket sock, HttpEndPointListener epl, bool secure, X509Certificate cert)
System\Net\Managed\HttpEndPointListener.cs (1)
49private readonly X509Certificate? _cert;
System\Net\Managed\HttpListener.Certificates.cs (1)
20internal static X509Certificate? LoadCertificateAndKey(IPAddress addr, int port)
System.Net.Quic (10)
System\Net\Quic\Internal\MsQuicConfiguration.Cache.cs (2)
54public CacheKey(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites) 132private static MsQuicConfigurationSafeHandle GetCachedCredentialOrCreate(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites)
System\Net\Quic\Internal\MsQuicConfiguration.cs (7)
16private static bool HasPrivateKey(this X509Certificate certificate) 33X509Certificate? certificate = null; 42X509Certificate selectedCertificate = authenticationOptions.LocalCertificateSelectionCallback( 62foreach (X509Certificate clientCertificate in authenticationOptions.ClientCertificates) 94X509Certificate? certificate = null; 120private static MsQuicConfigurationSafeHandle Create(QuicConnectionOptions options, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol>? alpnProtocols, CipherSuitesPolicy? cipherSuitesPolicy, EncryptionPolicy encryptionPolicy) 200private static unsafe MsQuicConfigurationSafeHandle CreateInternal(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites)
System\Net\Quic\QuicConnection.cs (1)
285public X509Certificate? RemoteCertificate
System.Net.Requests (2)
System\Net\ServicePoint\ServicePoint.cs (2)
87public X509Certificate? Certificate { get; internal set; } 89public X509Certificate? ClientCertificate { get; internal set; }
System.Net.Security (29)
System\Net\Security\NetEventSource.Security.cs (5)
73public void LocatingPrivateKey(X509Certificate x509Certificate, object instance) => 105public void RemoteCertificate(X509Certificate? remoteCertificate) => 137public void AttemptingRestartUsingCert(X509Certificate? clientCertificate, SslStream SslStream) => 161public void SelectedCert(X509Certificate clientCertificate, SslStream SslStream) => 280if (value is X509Certificate cert)
System\Net\Security\SslServerAuthenticationOptions.cs (1)
41public X509Certificate? ServerCertificate { get; set; }
System\Net\Security\SslStream.cs (15)
33public delegate bool RemoteCertificateValidationCallback(object sender, X509Certificate? certificate, X509Chain? chain, SslPolicyErrors sslPolicyErrors); 36public delegate X509Certificate LocalCertificateSelectionCallback(object sender, string targetHost, X509CertificateCollection localCertificates, X509Certificate? remoteCertificate, string[] acceptableIssuers); 38public delegate X509Certificate ServerCertificateSelectionCallback(object sender, string? hostName); 265public virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, AsyncCallback? asyncCallback, object? asyncState) 273public virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, 279public virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, 342public virtual void AuthenticateAsServer(X509Certificate serverCertificate) 347public virtual void AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation) 352public virtual void AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) 403public virtual Task AuthenticateAsServerAsync(X509Certificate serverCertificate) => 406public virtual Task AuthenticateAsServerAsync(X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation) 419public virtual Task AuthenticateAsServerAsync(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) 544public virtual X509Certificate? LocalCertificate 554public virtual X509Certificate? RemoteCertificate
System\Net\Security\SslStream.Protocol.cs (8)
56private X509Certificate? _selectedClientCertificate; 80internal X509Certificate? LocalServerCertificate 105internal X509Certificate? LocalClientCertificate 182internal static X509Certificate2? FindCertificateWithPrivateKey(object instance, bool isServer, X509Certificate certificate) 278private static X509Certificate2? MakeEx(X509Certificate certificate) 318X509Certificate? clientCertificate = null; // candidate certificate that can come from the user callback or be guessed when targeting a session restart. 320List<X509Certificate>? filteredCerts = null; // This is an intermediate client certs collection that try to use if no selectedCert is available yet. 675X509Certificate? localCertificate = null;
System.Security.Cryptography (30)
System\Security\Cryptography\X509Certificates\CertificatePal.cs (1)
12internal static partial ICertificatePal FromOtherCert(X509Certificate copyFrom);
System\Security\Cryptography\X509Certificates\CertificatePal.OpenSsl.cs (1)
18internal static partial ICertificatePal FromOtherCert(X509Certificate copyFrom)
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (3)
33public static ICertificatePal FromOtherCert(X509Certificate cert) 63X509Certificate.GetPkcs12Limits(fromFile: false, password)); 93X509Certificate.GetPkcs12Limits(fromFile: true, password));
System\Security\Cryptography\X509Certificates\StorePal.OpenSsl.cs (2)
52X509Certificate.GetPkcs12Limits(fromFile: false, password))); 121X509Certificate.GetPkcs12Limits(fromFile: true, password)));
System\Security\Cryptography\X509Certificates\X509Certificate.cs (5)
210public X509Certificate(X509Certificate cert) 231public static X509Certificate CreateFromCertFile(string filename) 238public static X509Certificate CreateFromSignedFile(string filename) 297public override bool Equals([NotNullWhen(true)] object? obj) => obj is X509Certificate other && Equals(other); 299public virtual bool Equals([NotNullWhen(true)] X509Certificate? other)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
178public X509Certificate2(X509Certificate certificate)
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (3)
203X509Certificate.ValidateKeyStorageFlags(keyStorageFlags); 228X509Certificate.ValidateKeyStorageFlags(keyStorageFlags); 254X509Certificate.ValidateKeyStorageFlags(keyStorageFlags);
System\Security\Cryptography\X509Certificates\X509CertificateCollection.cs (12)
15public X509CertificateCollection(X509Certificate[] value) 25public X509Certificate this[int index] 29return ((X509Certificate)(List[index])!); 39public int Add(X509Certificate value) 44public void AddRange(X509Certificate[] value) 64public bool Contains(X509Certificate value) 69public void CopyTo(X509Certificate[] array, int index) 82foreach (X509Certificate cert in List) 89public int IndexOf(X509Certificate value) 94public void Insert(int index, X509Certificate value) 99public void Remove(X509Certificate value) 111if (!(value is X509Certificate))
System\Security\Cryptography\X509Certificates\X509CertificateEnumerator.cs (2)
21public X509Certificate Current 23get { return (X509Certificate)_enumerator.Current!; }
System.Security.Cryptography.X509Certificates (1)
System.Security.Cryptography.X509Certificates.cs (1)
17[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.X509Certificate))]
System.Security.Cryptography.Xml (8)
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (4)
45public KeyInfoX509Data(X509Certificate cert) 50public KeyInfoX509Data(X509Certificate cert, X509IncludeOption includeOption) 113public void AddCertificate(X509Certificate certificate) 262foreach (X509Certificate certificate in _certificates)
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (4)
215X509Certificate? certificate = key as X509Certificate; 762internal static void LogVerifyKeyUsage(SignedXml signedXml, X509Certificate certificate, X509KeyUsageExtension keyUsages) 944internal static void LogVerifyX509Chain(SignedXml signedXml, X509Chain chain, X509Certificate certificate)
System.Security.Permissions (7)
System\Security\Permissions\PublisherIdentityPermission.cs (2)
13public PublisherIdentityPermission(X509Certificate certificate) { } 15public X509Certificate Certificate { get; set; }
System\Security\Policy\Publisher.cs (3)
13public Publisher(X509Certificate cert) { } 14public X509Certificate Certificate { get { return default(X509Certificate); } }
System\Security\Policy\PublisherMembershipCondition.cs (2)
10public PublisherMembershipCondition(X509Certificate certificate) { } 11public X509Certificate Certificate { get; set; }
System.ServiceModel.NetFramingBase (3)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (3)
396private static X509Certificate SelectClientCertificate(object sender, string targetHost, 397X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssuers) 402private bool ValidateRemoteCertificate(object sender, X509Certificate certificate, X509Chain chain,
Templates.Blazor.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
861/// <see cref="X509Certificate.Equals(X509Certificate?)"/> is not adequate for security purposes.
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
861/// <see cref="X509Certificate.Equals(X509Certificate?)"/> is not adequate for security purposes.
Templates.Blazor.WebAssembly.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
861/// <see cref="X509Certificate.Equals(X509Certificate?)"/> is not adequate for security purposes.
Templates.Mvc.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
861/// <see cref="X509Certificate.Equals(X509Certificate?)"/> is not adequate for security purposes.
Templates.Tests (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
861/// <see cref="X509Certificate.Equals(X509Certificate?)"/> is not adequate for security purposes.