aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Common
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Common')
-rw-r--r--src/slskd/Common/Cryptography/X509.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Common/Cryptography/X509.cs b/src/slskd/Common/Cryptography/X509.cs
index bed224cf..b003decf 100644
--- a/src/slskd/Common/Cryptography/X509.cs
+++ b/src/slskd/Common/Cryptography/X509.cs
@@ -64,7 +64,7 @@ namespace slskd.Cryptography
new DateTimeOffset(DateTime.UtcNow.AddDays(-1)),
new DateTimeOffset(DateTime.UtcNow.AddDays(36500)));
- return new X509Certificate2(certificate.Export(X509ContentType.Pkcs12, password), password, x509KeyStorageFlags);
+ return X509CertificateLoader.LoadPkcs12(certificate.Export(X509ContentType.Pkcs12, password), password, x509KeyStorageFlags);
}
/// <summary>
@@ -80,7 +80,7 @@ namespace slskd.Cryptography
try
{
- _ = new X509Certificate2(fileName, password);
+ _ = X509CertificateLoader.LoadPkcs12FromFile(fileName, password);
return true;
}
catch (Exception ex)