55 references to X509Certificate2
dotnet-dev-certs (1)
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
74using var publicCertificate = new X509Certificate2(certificate.Export(X509ContentType.Cert));
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 (1)
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
74using var publicCertificate = new X509Certificate2(certificate.Export(X509ContentType.Cert));
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)
395_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 (1)
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
74using var publicCertificate = new X509Certificate2(certificate.Export(X509ContentType.Cert));
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.Build.Tasks.Feed (1)
src\PublishArtifactsInManifest.cs (1)
347new X509Certificate2(Convert.FromBase64String(File.ReadAllText(AkaMSClientCertificate))) : null,
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.Net.HttpListener (1)
System\Net\Managed\HttpConnection.cs (1)
93_clientCert = c as X509Certificate2 ?? new X509Certificate2(c.GetRawCertData());
System.Security.Cryptography (2)
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
893X509Certificate2 ret = new X509Certificate2(writer.Encode());
System\Security\Cryptography\X509Certificates\OpenSslCertificateAssetDownloader.cs (1)
37X509Certificate2 certificate = new X509Certificate2(data);
System.Security.Cryptography.Pkcs (2)
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decode.cs (1)
48originatorCerts.Add(new X509Certificate2(certChoice.Certificate.Value.ToArray()));
System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
79return new X509Certificate2(PkcsHelpers.DecodeOctetString(_decoded.CertValue));
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (2)
33X509Certificate2 certificate = new X509Certificate2(rgbCert); 319AddCertificate(new X509Certificate2(Convert.FromBase64String(Utils.DiscardWhiteSpaces(node.InnerText))));
System.ServiceModel.Http.Tests (1)
ServiceModel\BasicHttpsBindingTest.cs (1)
74var certificate = new X509Certificate2(certificateBytes);
System.ServiceModel.Primitives (6)
System\IdentityModel\SecurityUtils.cs (1)
245certificate = (rawData == null || rawData.Length == 0) ? null : new X509Certificate2(rawData);
System\IdentityModel\Tokens\X509RawDataKeyIdentifierClause.cs (1)
43_certificate = new X509Certificate2(GetBuffer());
System\ServiceModel\Security\ReceiveSecurityHeader.cs (1)
1082token = new X509SecurityToken(new X509Certificate2(((X509RawDataKeyIdentifierClause)keyIdentifierClause).GetX509RawData()), false);
System\ServiceModel\Security\SecurityHeaderTokenResolver.cs (1)
175resolvedToken = new X509SecurityToken(new X509Certificate2(((X509RawDataKeyIdentifierClause)keyIdentifierClause).GetX509RawData()));
System\ServiceModel\Security\SecurityUtils.cs (1)
1013certificate = (rawData == null || rawData.Length == 0) ? null : new X509Certificate2(rawData);
System\ServiceModel\X509CertificateEndpointIdentity.cs (1)
65X509Certificate2 certificate = new X509Certificate2(Convert.FromBase64String(reader.ReadContentAsString()));
Templates.Blazor.Tests (1)
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
74using var publicCertificate = new X509Certificate2(certificate.Export(X509ContentType.Cert));
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
74using var publicCertificate = new X509Certificate2(certificate.Export(X509ContentType.Cert));
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
74using var publicCertificate = new X509Certificate2(certificate.Export(X509ContentType.Cert));
Templates.Mvc.Tests (1)
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
74using var publicCertificate = new X509Certificate2(certificate.Export(X509ContentType.Cert));
Templates.Tests (1)
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
74using var publicCertificate = new X509Certificate2(certificate.Export(X509ContentType.Cert));
WebTransportInteractiveSampleApp (1)
Program.cs (1)
195cert = new(crt.Export(X509ContentType.Pfx));
WebTransportSampleApp (1)
Program.cs (1)
81cert = new(crt.Export(X509ContentType.Pfx));