From fc788efa49e129eadbcc64a1b4fd7797e020d854 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 1 May 2017 16:03:27 -0400 Subject: add password to self signed cert --- .../Cryptography/CertificateGenerator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Startup.Common/Cryptography') diff --git a/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs b/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs index a362045d02..4f5b3d0042 100644 --- a/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs +++ b/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs @@ -44,7 +44,7 @@ namespace Emby.Common.Implementations.Security cb.NotAfter = notAfter; cb.SubjectName = subject; cb.SubjectPublicKey = subjectKey; - + // signature cb.Hash = "SHA256"; byte[] rawcert = cb.Sign(issuerKey); @@ -60,6 +60,7 @@ namespace Emby.Common.Implementations.Security attributes.Add(PKCS9.localKeyId, list); p12.AddCertificate(new X509Certificate(rawcert), attributes); + p12.Password = password; p12.AddPkcs8ShroudedKeyBag(subjectKey, attributes); p12.SaveToFile(fileName); -- cgit v1.2.3