Skip to content

Commit 9fdf46e

Browse files
committed
Cleanup
1 parent 6629759 commit 9fdf46e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Servers/Kestrel/Core/src/Internal/Certificates/CertificateConfigLoader.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,8 @@ public CertificateConfigLoader(IHostEnvironment hostEnvironment, ILogger<Kestrel
3737
else if (certInfo.IsFileCert)
3838
{
3939
var certificatePath = Path.Combine(HostEnvironment.ContentRootPath, certInfo.Path!);
40-
41-
X509Certificate2Collection? fullChain = null;
42-
if (certInfo.Path != null)
43-
{
44-
fullChain = new X509Certificate2Collection();
45-
fullChain.ImportFromPemFile(certificatePath);
46-
}
40+
var fullChain = new X509Certificate2Collection();
41+
fullChain.ImportFromPemFile(certificatePath);
4742

4843
if (certInfo.KeyPath != null)
4944
{

0 commit comments

Comments
 (0)