81 writes to ServerCertificate
Aspire.Dashboard.Tests (1)
Integration\IntegrationTestHelpers.cs (1)
106options.ServerCertificate = s_testCertificate;
InMemory.FunctionalTests (38)
HttpsConnectionMiddlewareTests.cs (34)
55listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 109listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 221listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 264o.ServerCertificate = _x509Certificate2; 288listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 323listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 360ServerCertificate = _x509Certificate2, 377ServerCertificate = _x509Certificate2, 434listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 592ServerCertificate = _x509Certificate2NoExt, 656options.ServerCertificate = _x509Certificate2; 692options.ServerCertificate = _x509Certificate2; 736options.ServerCertificate = _x509Certificate2; 777options.ServerCertificate = _x509Certificate2; 910options.ServerCertificate = _x509Certificate2; 978ServerCertificate = _x509Certificate2, 1034options.ServerCertificate = _x509Certificate2; 1171options.ServerCertificate = _x509Certificate2; 1218options.ServerCertificate = _x509Certificate2; 1267listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 1287options.ServerCertificate = _x509Certificate2; 1319ServerCertificate = _x509Certificate2, 1352ServerCertificate = _x509Certificate2, 1378ServerCertificate = _x509Certificate2, 1401options.ServerCertificate = _x509Certificate2; 1426options.ServerCertificate = _x509Certificate2; 1479ServerCertificate = cert, 1499ServerCertificate = cert, 1519ServerCertificate = cert, 1568ServerCertificate = _x509Certificate2, 1582ServerCertificate = _x509Certificate2, 1596ServerCertificate = _x509Certificate2, 1609ServerCertificate = _x509Certificate2, 1620ServerCertificate = 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(); 364httpsOptions.ServerCertificate = TestResources.GetTestCertificate(); 372ServerCertificate = 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; 321httpsOptions.ServerCertificate = DevelopmentCertificate;
ListenOptionsHttpsExtensions.cs (2)
136options.ServerCertificate = serverCertificate; 155options.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>()), 535ServerCertificate = new X509Certificate2(TestResources.GetCertPath("aspnetdevcert.pfx"), "testPassword") 562ServerCertificate = new X509Certificate2(Array.Empty<byte>()),
Microsoft.AspNetCore.Server.Kestrel.Tests (12)
HttpsConfigurationTests.cs (1)
255ServerCertificate = new X509Certificate2(Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx"), "testPassword"),
KestrelConfigurationLoaderTests.cs (11)
163opt.ServerCertificate = TestResources.GetTestCertificate(); 1333opt.ServerCertificate = TestResources.GetTestCertificate(); 1403opt.ServerCertificate = TestResources.GetTestCertificate(); 1452opt.ServerCertificate = TestResources.GetTestCertificate(); 1497opt.ServerCertificate = TestResources.GetTestCertificate(); 1527opt.ServerCertificate = TestResources.GetTestCertificate(); 1556opt.ServerCertificate = TestResources.GetTestCertificate(); 1589opt.ServerCertificate = TestResources.GetTestCertificate(); 1661opt.ServerCertificate = TestResources.GetTestCertificate(); 1689opt.ServerCertificate = TestResources.GetTestCertificate(); 1716opt.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)
656listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = certificate });
24 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)
62internal bool HasServerCertificateOrSelector => ServerCertificate is not null || ServerCertificateSelector is not null;
Internal\SniOptionsSelector.cs (1)
67sslOptions.ServerCertificate = fallbackHttpsOptions.ServerCertificate;
Middleware\HttpsConnectionMiddleware.cs (2)
86_serverCertificate = options.ServerCertificate; 574ServerCertificate = httpsOptions.ServerCertificate,
TlsConfigurationLoader.cs (1)
74httpsOptions.ServerCertificate = serverCert ?? httpsOptions.ServerCertificate;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
SniOptionsSelectorTests.cs (1)
547Assert.Same(fallbackOptions.ServerCertificate, options.ServerCertificate);
Microsoft.AspNetCore.Server.Kestrel.Tests (13)
KestrelConfigurationLoaderTests.cs (13)
179Assert.NotNull(opt.HttpsOptions.ServerCertificate); 216Assert.NotNull(opt.HttpsOptions.ServerCertificate); 294Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, certificate.SerialNumber); 378Assert.Equal(expectedCert.SerialNumber, httpsOptions.ServerCertificate.SerialNumber); 432Assert.Equal(expectedCert.SerialNumber, listenOptions.HttpsOptions!.ServerCertificate.SerialNumber); 473Assert.Equal(listenOptions.HttpsOptions.ServerCertificate?.SerialNumber, certificate.SerialNumber); 523Assert.Equal(listenOptions.HttpsOptions.ServerCertificate?.SerialNumber, certificate.SerialNumber); 576Assert.Equal(listenOptions.HttpsOptions.ServerCertificate?.SerialNumber, defaultCertificate.SerialNumber); 839Assert.Equal(certificate.SerialNumber, opt.HttpsOptions.ServerCertificate.SerialNumber); 1160Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, expectedSerialNumber); 1259Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, expectedSerialNumber); 1349Assert.NotNull(opt.HttpsOptions.ServerCertificate); 1419Assert.NotNull(opt.HttpsOptions.ServerCertificate);