35 references to X509Certificate2
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (1)
859certificate = (rawData == null || rawData.Length == 0) ? null : new X509Certificate2(rawData);
FrameworkFork\System.ServiceModel\System\ServiceModel\X509CertificateEndpointIdentity.cs (1)
59X509Certificate2 certificate = new X509Certificate2(Convert.FromBase64String(reader.ReadElementString()));
HttpClientApp (1)
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
HttpStress (1)
Program.cs (1)
405cert = new X509Certificate2(cert.Export(X509ContentType.Pfx));
Infrastructure.Common (3)
CertificateManager.cs (1)
151var publicOnly = new X509Certificate2(certificate.RawData);
ServiceUtilHelper.cs (2)
151X509Certificate2 rootCertificate = new X509Certificate2(GetResourceFromServiceAsByteArray(RootCertificateResource)); 157return new X509Certificate2(await GetResourceFromServiceAsByteArrayAsync(MachineCertificateResource));
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
129return new X509Certificate2(_cert.RawData);
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
Interop.FunctionalTests (1)
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
InteropClient (1)
InteropClient.cs (1)
165var cert = new X509Certificate2(certData!);
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (1)
CertificateManagerTests.cs (1)
52var exportedCertificate = new X509Certificate2(File.ReadAllBytes(CertificateName));
Microsoft.AspNetCore.HttpOverrides (1)
CertificateForwardingOptions.cs (1)
27public Func<string, X509Certificate2> HeaderConverter = (headerValue) => new X509Certificate2(Convert.FromBase64String(headerValue));
Microsoft.AspNetCore.Server.HttpSys (2)
RequestProcessing\ClientCertLoader.cs (1)
280asyncResult.Complete((int)pClientCertInfo->CertFlags, new X509Certificate2(certEncoded));
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
812return new X509Certificate2(certEncoded);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContext.FeatureCollection.cs (1)
396_certificate = new X509Certificate2(rawCertificateCopy);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
812return new X509Certificate2(certEncoded);
Microsoft.AspNetCore.Server.IISIntegration (1)
ForwardedTlsConnectionFeature.cs (1)
32_certificate = new X509Certificate2(bytes);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
SniOptionsSelectorTests.cs (3)
474ServerCertificate = new X509Certificate2(Array.Empty<byte>()), 561ServerCertificate = new X509Certificate2(Array.Empty<byte>()), 852ServerCertificate = new X509Certificate2(Array.Empty<byte>()),
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
129return new X509Certificate2(_cert.RawData);
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
812return new X509Certificate2(certEncoded);
Microsoft.DotNet.Deployment.Tasks.Links (1)
Sockets.BindTests (1)
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
Sockets.FunctionalTests (1)
src\Shared\TestResources.cs (1)
51return new X509Certificate2(cert.Export(X509ContentType.Pkcs12));
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\OpenSslCertificateAssetDownloader.cs (1)
37certificate = new X509Certificate2(data);
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (1)
38new X509Certificate2((byte[])null!) :
System.ServiceModel.Http.Tests (1)
ServiceModel\BasicHttpsBindingTest.cs (1)
75var certificate = new X509Certificate2(certificateBytes);
WebTransportInteractiveSampleApp (1)
Program.cs (1)
195cert = new(crt.Export(X509ContentType.Pfx));
WebTransportSampleApp (1)
Program.cs (1)
81cert = new(crt.Export(X509ContentType.Pfx));