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 }); 208ServerCertificate = _x509Certificate2, 225ServerCertificate = _x509Certificate2, 282listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 440ServerCertificate = _x509Certificate2NoExt, 504options.ServerCertificate = _x509Certificate2; 540options.ServerCertificate = _x509Certificate2; 584options.ServerCertificate = _x509Certificate2; 625options.ServerCertificate = _x509Certificate2; 758options.ServerCertificate = _x509Certificate2; 826ServerCertificate = _x509Certificate2, 882options.ServerCertificate = _x509Certificate2; 1019options.ServerCertificate = _x509Certificate2; 1066options.ServerCertificate = _x509Certificate2; 1115listenOptions.UseHttps(new HttpsConnectionAdapterOptions { ServerCertificate = _x509Certificate2 }); 1135options.ServerCertificate = _x509Certificate2; 1167ServerCertificate = _x509Certificate2, 1200ServerCertificate = _x509Certificate2, 1226ServerCertificate = _x509Certificate2, 1249options.ServerCertificate = _x509Certificate2; 1274options.ServerCertificate = _x509Certificate2; 1327ServerCertificate = cert, 1347ServerCertificate = cert, 1367ServerCertificate = cert, 1416ServerCertificate = _x509Certificate2, 1430ServerCertificate = _x509Certificate2, 1444ServerCertificate = _x509Certificate2, 1457ServerCertificate = _x509Certificate2, 1468ServerCertificate = 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);