77 writes to ServerCertificate
Aspire.Dashboard.Tests (1)
Integration\IntegrationTestHelpers.cs (1)
104options.ServerCertificate = s_testCertificate;
InMemory.FunctionalTests (34)
HttpsConnectionMiddlewareTests.cs (30)
55listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 109listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 212ServerCertificate = _x509Certificate2, 229ServerCertificate = _x509Certificate2, 286listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 444ServerCertificate = _x509Certificate2NoExt, 508options.ServerCertificate = _x509Certificate2; 544options.ServerCertificate = _x509Certificate2; 588options.ServerCertificate = _x509Certificate2; 629options.ServerCertificate = _x509Certificate2; 762options.ServerCertificate = _x509Certificate2; 830ServerCertificate = _x509Certificate2, 886options.ServerCertificate = _x509Certificate2; 1023options.ServerCertificate = _x509Certificate2; 1070options.ServerCertificate = _x509Certificate2; 1119listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 1139options.ServerCertificate = _x509Certificate2; 1171ServerCertificate = _x509Certificate2, 1204ServerCertificate = _x509Certificate2, 1230ServerCertificate = _x509Certificate2, 1253options.ServerCertificate = _x509Certificate2; 1278options.ServerCertificate = _x509Certificate2; 1331ServerCertificate = cert, 1351ServerCertificate = cert, 1371ServerCertificate = cert, 1420ServerCertificate = _x509Certificate2, 1434ServerCertificate = _x509Certificate2, 1448ServerCertificate = _x509Certificate2, 1461ServerCertificate = _x509Certificate2, 1472ServerCertificate = serverCertificate,
HttpsTests.cs (4)
114options.ServerCertificate = _x509Certificate2; 376o.ServerCertificate = new X509Certificate2(_x509Certificate2); 487https.ServerCertificate = _x509Certificate2; 725httpsOptions.ServerCertificate = testCert;
Interop.FunctionalTests (9)
Http3\Http3TlsTests.cs (7)
91httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); 133httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); 178httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); 232httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); 273httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); 361httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); 369ServerCertificate = TestResources.GetTestCertificate()
HttpClientHttp2InteropTests.cs (2)
1611httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); 1656httpsOptions.ServerCertificate = TestResources.GetTestCertificate();
Microsoft.AspNetCore.Server.Kestrel.Core (6)
KestrelServerOptions.cs (3)
299httpsOptions.ServerCertificate = certificateFromTest; 305httpsOptions.ServerCertificate = certificateFromLoader; 317httpsOptions.ServerCertificate = DevelopmentCertificate;
ListenOptionsHttpsExtensions.cs (2)
132options.ServerCertificate = serverCertificate; 151options.ServerCertificate = serverCertificate;
TlsConfigurationLoader.cs (1)
74httpsOptions.ServerCertificate = serverCert ?? httpsOptions.ServerCertificate;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
SniOptionsSelectorTests.cs (3)
474ServerCertificate = new X509Certificate2(Array.Empty<byte>()), 534ServerCertificate = new X509Certificate2(TestResources.GetCertPath("aspnetdevcert.pfx"), "testPassword") 561ServerCertificate = new X509Certificate2(Array.Empty<byte>()),
Microsoft.AspNetCore.Server.Kestrel.Tests (12)
HttpsConfigurationTests.cs (1)
222ServerCertificate = new X509Certificate2(Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx"), "testPassword"),
KestrelConfigurationLoaderTests.cs (11)
163opt.ServerCertificate = TestResources.GetTestCertificate(); 1057opt.ServerCertificate = TestResources.GetTestCertificate(); 1127opt.ServerCertificate = TestResources.GetTestCertificate(); 1176opt.ServerCertificate = TestResources.GetTestCertificate(); 1221opt.ServerCertificate = TestResources.GetTestCertificate(); 1251opt.ServerCertificate = TestResources.GetTestCertificate(); 1280opt.ServerCertificate = TestResources.GetTestCertificate(); 1313opt.ServerCertificate = TestResources.GetTestCertificate(); 1385opt.ServerCertificate = TestResources.GetTestCertificate(); 1413opt.ServerCertificate = TestResources.GetTestCertificate(); 1440opt.ServerCertificate = TestResources.GetTestCertificate();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
WebHostTests.cs (1)
60httpsOptions.ServerCertificate = TestResources.GetTestCertificate();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (8)
HubConnectionTests.cs (8)
1755httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert(); 1813httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert(); 1873httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert(); 1916httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert(); 2373httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert(); 2426httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert(); 2469httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert(); 2519httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert();
SignalR.Client.FunctionalTestApp (1)
Program.cs (1)
43httpsOptions.ServerCertificate = TestCertificateHelper.GetTestCert();
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
191httpsOptions.ServerCertificate = TestResources.GetTestCertificate();
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
657listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = certificate });
19 references to ServerCertificate
InMemory.FunctionalTests (5)
HttpsTests.cs (5)
66Assert.Null(opt.ServerCertificate); 113Assert.Null(options.ServerCertificate); 122Assert.Equal(_x509Certificate2, opt.ServerCertificate); 141Assert.Null(options.ServerCertificate); 154Assert.Null(opt.ServerCertificate);
Microsoft.AspNetCore.Server.Kestrel.Core (5)
HttpsConnectionAdapterOptions.cs (1)
61internal bool HasServerCertificateOrSelector => ServerCertificate is not null || ServerCertificateSelector is not null;
Internal\SniOptionsSelector.cs (1)
67sslOptions.ServerCertificate = fallbackHttpsOptions.ServerCertificate;
Middleware\HttpsConnectionMiddleware.cs (2)
82_serverCertificate = options.ServerCertificate; 544ServerCertificate = httpsOptions.ServerCertificate,
TlsConfigurationLoader.cs (1)
74httpsOptions.ServerCertificate = serverCert ?? httpsOptions.ServerCertificate;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
SniOptionsSelectorTests.cs (1)
546Assert.Same(fallbackOptions.ServerCertificate, options.ServerCertificate);
Microsoft.AspNetCore.Server.Kestrel.Tests (8)
KestrelConfigurationLoaderTests.cs (8)
179Assert.NotNull(opt.HttpsOptions.ServerCertificate); 268Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, certificate.SerialNumber); 352Assert.Equal(expectedCert.SerialNumber, httpsOptions.ServerCertificate.SerialNumber); 693Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, certificate.SerialNumber); 884Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, expectedSerialNumber); 983Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, expectedSerialNumber); 1073Assert.NotNull(opt.HttpsOptions.ServerCertificate); 1143Assert.NotNull(opt.HttpsOptions.ServerCertificate);