Skip to content

Commit ab3799f

Browse files
authored
Make CertificateConfig linker friendly (#25515)
1 parent 474f947 commit ab3799f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Servers/Kestrel/Core/src/Internal/ConfigurationReader.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,19 @@ internal class CertificateConfig
353353
public CertificateConfig(IConfigurationSection configSection)
354354
{
355355
ConfigSection = configSection;
356-
ConfigSection.Bind(this);
356+
357+
// Bind explictly to preserve linkability
358+
Path = configSection[nameof(Path)];
359+
KeyPath = configSection[nameof(KeyPath)];
360+
Password = configSection[nameof(Password)];
361+
Subject = configSection[nameof(Subject)];
362+
Store = configSection[nameof(Store)];
363+
Location = configSection[nameof(Location)];
364+
365+
if (bool.TryParse(configSection[nameof(AllowInvalid)], out var value))
366+
{
367+
AllowInvalid = value;
368+
}
357369
}
358370

359371
// For testing

0 commit comments

Comments
 (0)