53 references to X509Certificate2
Aspire.Dashboard (1)
ResourceService\DashboardClient.cs (1)
181return [new X509Certificate2(filePath, password)];
Aspire.Dashboard.Tests (1)
tests\Shared\TestCertificateLoader.cs (1)
36return new X509Certificate2(GetCertPath(certName), password);
HttpClientApp (2)
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);
InMemory.FunctionalTests (10)
CertificateLoaderTests.cs (4)
21var cert = new X509Certificate2(certPath, "testPassword"); 34var cert = new X509Certificate2(certPath, "testPassword"); 49var cert = new X509Certificate2(certPath, "testPassword"); 64var cert = new X509Certificate2(certPath, "testPassword");
HttpsConnectionMiddlewareTests.cs (4)
1307var cert = new X509Certificate2(certPath, "testPassword"); 1320var cert = new X509Certificate2(certPath, "testPassword"); 1339var cert = new X509Certificate2(certPath, "testPassword"); 1360var cert = new X509Certificate2(certPath, "testPassword");
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);
Interop.FunctionalTests (2)
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);
Microsoft.AspNetCore.DataProtection.Extensions.Tests (5)
DataProtectionProviderTests.cs (5)
148var certWithoutKey = new X509Certificate2(Path.Combine(GetTestFilesPath(), "TestCertWithoutPrivateKey.pfx"), "password"); 193var certWithKey = new X509Certificate2(Path.Combine(GetTestFilesPath(), "TestCert3.pfx"), "password3"); 217var certificate = new X509Certificate2(filePath, "password"); 246var certificate = new X509Certificate2(filePath, "password"); 288var certificate = new X509Certificate2(filePath, "password");
Microsoft.AspNetCore.DataProtection.Tests (7)
XmlEncryption\EncryptedXmlDecryptorTests.cs (7)
18var testCert1 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.pfx"), "password"); 32var testCert1 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.pfx"), "password"); 33var testCert2 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert2.pfx"), "password"); 50var fullCert = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.pfx"), "password"); 51var publicKeyOnly = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.PublicKeyOnly.cer"), ""); 68var testCert1 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert1.pfx"), "password"); 69var testCert2 = new X509Certificate2(Path.Combine(AppContext.BaseDirectory, "TestFiles", "TestCert2.pfx"), "password");
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Internal\Certificates\CertificateConfigLoader.cs (1)
74return (new X509Certificate2(Path.Combine(HostEnvironment.ContentRootPath, certInfo.Path!), certInfo.Password), fullChain);
ListenOptionsHttpsExtensions.cs (2)
53return listenOptions.UseHttps(new X509Certificate2(Path.Combine(env.ContentRootPath, fileName), password)); 68return listenOptions.UseHttps(new X509Certificate2(Path.Combine(env.ContentRootPath, fileName), password), configureOptions);
TlsConfigurationLoader.cs (1)
157var certificate = new X509Certificate2(certificatePath, certificateConfig.Password);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
SniOptionsSelectorTests.cs (1)
534ServerCertificate = new X509Certificate2(TestResources.GetCertPath("aspnetdevcert.pfx"), "testPassword")
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);
Microsoft.AspNetCore.Server.Kestrel.Tests (6)
HttpsConfigurationTests.cs (3)
28serverOptions.TestOverrideDefaultCertificate = new X509Certificate2(Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx"), "testPassword"); 193serverOptions.TestOverrideDefaultCertificate = new X509Certificate2(Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx"), "testPassword"); 222ServerCertificate = new X509Certificate2(Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx"), "testPassword"),
KestrelConfigurationLoaderTests.cs (1)
381var otherCertificate = new X509Certificate2(otherCertificatePath, "testPassword");
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
src\SignalR\common\Shared\TestCertificates.cs (2)
36return new X509Certificate2(certPath, "testPassword"); 42return new X509Certificate2(certPath, "testPassword");
SignalR.Client.FunctionalTestApp (2)
src\SignalR\common\Shared\TestCertificates.cs (2)
36return new X509Certificate2(certPath, "testPassword"); 42return new X509Certificate2(certPath, "testPassword");
Sockets.BindTests (2)
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);
Sockets.FunctionalTests (2)
src\Shared\TestResources.cs (2)
31return new X509Certificate2(GetCertPath(certName), "testPassword"); 41return new X509Certificate2(GetCertPath(certName), password);