recover regions main http server ssl suport. Using a PKCS12 cert file, and not certs store for now. Option http_listener_cn, cert CN need to the same as external IP. Self sign certs do seem to work, but the viewers option NoVerifySLLCert needs to be set true. CA check is not done but they do check the IP

This commit is contained in:
UbitUmarov
2016-10-06 21:35:11 +01:00
parent db1e75b0ac
commit b51739e23e
7 changed files with 53 additions and 16 deletions

View File

@@ -153,11 +153,19 @@ namespace OpenSim.Framework.Servers.HttpServer
m_ssl = ssl;
}
public BaseHttpServer(uint port, bool ssl, uint sslport, string CN) : this (port, ssl)
public BaseHttpServer(uint port, bool ssl, uint sslport, string CN, string CPath, string CPass) : this (port, ssl)
{
if (m_ssl)
{
if(string.IsNullOrEmpty(CPass))
throw new Exception("invalid main http server cert path");
m_sslport = sslport;
m_cert = new X509Certificate2(CPath, CPass);
m_SSLCommonName = m_cert.GetNameInfo(X509NameType.SimpleName,false);
if(CN != m_SSLCommonName)
throw new Exception("main http server CN does not match cert CN");
}
}