Merge pull request #4726 from BaronGreenback/19.0RC--Fix-CertificateLoadError

Fix - Access Denied on using certificates in windows as user.
This commit is contained in:
Claus Vium 2020-12-13 13:35:02 +01:00 committed by GitHub
commit c5a5f77b9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -716,7 +716,7 @@ namespace Emby.Server.Implementations
// Don't use an empty string password
var password = string.IsNullOrWhiteSpace(info.Password) ? null : info.Password;
var localCert = new X509Certificate2(certificateLocation, password);
var localCert = new X509Certificate2(certificateLocation, password, X509KeyStorageFlags.UserKeySet);
// localCert.PrivateKey = PrivateKey.CreateFromFile(pvk_file).RSA;
if (!localCert.HasPrivateKey)
{