mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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:
@@ -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");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user