jellyfin / jellyfin-server-windows

The Windows tray app and installer for Jellyfin Server on Windows.
https://jellyfin.org
MIT License
79 stars 26 forks source link

jellyfin throws error on launch when using .p12 for HTTPS support #106

Closed iamtherobin closed 2 weeks ago

iamtherobin commented 5 months ago

I have jellyfin server portable running on my Windows 7 machine for a couple of months testing it out. I do not have a reverse proxy. It was working perfectly fine with HTTPS (default port 8920 and port forwarding on my network) using the .p12 file I supplied it which was generated using ACME client.

However since the original cert expired, I updated it and now I cannot get it to work with HTTPS at all. This is what I am seeing in the console when launching the server.

[03:03:51] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error loading cert from C:\Portable Software\jellyfin\jellyfin.pfx
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: The specified network password is not correct.
   at Internal.Cryptography.Pal.CertificatePal.FilterPFXStore(ReadOnlySpan`1 rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
   at Internal.Cryptography.Pal.CertificatePal.FromBlobOrFile(ReadOnlySpan`1 rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
   at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags)
   at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags)
   at Emby.Server.Implementations.ApplicationHost.GetCertificate(String path, String password)

I have tried using a cert password, no password, generating the .p12/.pfx file through openssl (using the .key and .crt files from acme client) and even creating a self signed p12/pfx. I am always seeing this error now when starting the server with a p12/pfx loaded. I also verified the .p12, .key and .crt files were valid using openssl.

What could be causing this?

anthonylavado commented 2 weeks ago

I realize now that this would have been a better question for the main repository, but I also don't believe that Windows 7 is officially supported anymore. I don't think it has for a long time to be honest.