mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-25 10:07:15 +01:00
add password to self signed cert
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user