|
|
|
@ -1197,8 +1197,6 @@ namespace Emby.Server.Implementations
|
|
|
|
|
protected IHttpListener CreateHttpListener() => new WebSocketSharpListener(Logger);
|
|
|
|
|
|
|
|
|
|
private CertificateInfo GetCertificateInfo(bool generateCertificate)
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(ServerConfigurationManager.Configuration.CertificatePath))
|
|
|
|
|
{
|
|
|
|
|
// Custom cert
|
|
|
|
|
return new CertificateInfo
|
|
|
|
@ -1208,18 +1206,6 @@ namespace Emby.Server.Implementations
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generate self-signed cert
|
|
|
|
|
var certHost = GetHostnameFromExternalDns(ServerConfigurationManager.Configuration.WanDdns);
|
|
|
|
|
var certPath = Path.Combine(ServerConfigurationManager.ApplicationPaths.ProgramDataPath, "ssl", "cert_" + (certHost + "2").GetMD5().ToString("N", CultureInfo.InvariantCulture) + ".pfx");
|
|
|
|
|
const string Password = "embycert";
|
|
|
|
|
|
|
|
|
|
return new CertificateInfo
|
|
|
|
|
{
|
|
|
|
|
Path = certPath,
|
|
|
|
|
Password = Password
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Called when [configuration updated].
|
|
|
|
|
/// </summary>
|
|
|
|
|