diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-01 16:03:27 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-01 16:03:27 -0400 |
| commit | fc788efa49e129eadbcc64a1b4fd7797e020d854 (patch) | |
| tree | 7edb5e8266ebbaa5b18ee723edfe3fdb62bc21c6 /MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs | |
| parent | dbfb1fb3705f7d1f562f28ed0126933dd423f814 (diff) | |
add password to self signed cert
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs b/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs index a362045d0..4f5b3d004 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); |
