Skip to content

Commit ccecd34

Browse files
committed
Fix formatting and nits for CertificateAndConfig
1 parent 3ee8b35 commit ccecd34

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/Servers/Kestrel/Core/src/IHttpsConfigurationService.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ internal readonly struct CertificateAndConfig
9494
public readonly CertificateConfig CertificateConfig;
9595

9696
public CertificateAndConfig(X509Certificate2 certificate, CertificateConfig certificateConfig)
97+
: this(
98+
certificate,
99+
certificateConfig,
100+
[])
97101
{
98-
Certificate = certificate;
99-
CertificateConfig = certificateConfig;
100-
CertificateChain = [];
101102
}
102103

103104
public CertificateAndConfig(X509Certificate2 certificate, CertificateConfig certificateConfig, X509Certificate2Collection certificateChain)

src/Servers/Kestrel/Core/src/KestrelConfigurationLoader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ internal KestrelConfigurationLoader(
7878
internal X509Certificate2? DefaultCertificate { get; set; }
7979

8080
internal X509Certificate2Collection? DefaultCertificateChain { get; set; }
81+
8182
/// <summary>
8283
/// Specifies a configuration Action to run when an endpoint with the given name is loaded from configuration.
8384
/// </summary>

src/Servers/Kestrel/Kestrel/test/KestrelConfigurationLoaderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public void ConfigureDefaultCertificatePathLoadsChain()
205205
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
206206
{
207207
new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
208-
new KeyValuePair<string,string>("Certificates:Default:Path",testCertPath)
208+
new KeyValuePair<string,string>("Certificates:Default:Path", testCertPath)
209209
}).Build();
210210

211211
serverOptions.Configure(config)

0 commit comments

Comments
 (0)