a few changes. in same cases http/https can't be determined. possible both need to be present, possible with http a redir to https. TODO

This commit is contained in:
UbitUmarov
2024-08-17 00:30:18 +01:00
parent 207c3d1e71
commit 79dbca84f9
6 changed files with 92 additions and 99 deletions

View File

@@ -2481,7 +2481,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
UserAgentServiceConnector userConnection = new(serverURI);
if (userConnection is not null && serverURI.StartsWith("http://"))
if (userConnection is not null)
{
userID = userConnection.GetUUID(realFirstName, realLastName);
if (!userID.IsZero())
@@ -2490,21 +2490,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return userID.ToString();
}
}
else
{
// Override hardcoded http in Util.ParseForeignAvatarName
string SSLserverURI = serverURI.Replace("http://", "https://");
userConnection = new(SSLserverURI);
if (userConnection is not null)
{
userID = userConnection.GetUUID(realFirstName, realLastName);
if (!userID.IsZero())
{
userManager.AddUser(userID, realFirstName, realLastName, SSLserverURI);
return userID.ToString();
}
}
}
}
catch (Exception /*e*/)
{

View File

@@ -617,7 +617,7 @@ namespace OpenSim.Services.GridService
}
//this should be the prefererred way of setting up hg links now
if (cmdparams[2].StartsWith("http") || cmdparams[2].StartsWith("https"))
if (cmdparams[2].StartsWith("http"))
{
RunLinkRegionCommand(cmdparams);
}

View File

@@ -311,30 +311,32 @@
;; SSL selfsigned certificate settings.
;; Enable selfsigned certificate creation for local and external use. When set to true, will create a folder SSL\ and 2 sub folders SSL\ssl\ and SSL\src\. Next creates and store an RSA private key in SSL\src\ and the derived selfsigned certificate in SSL\ssl\ folder. Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.
;# {EnbleSelfsignedCertSupport} {} {Enable selfsigned certificate creation and renew} {true false} false
EnableSelfsignedCertSupport = false
;; Is free... so why not :). Renew the selfsigned certificate on every server startup ?
;# {CertRenewOnStartup} {} {renew the selfsigned certificate on the server startup} {true false} true
CertRenewOnStartup = true
;; Certificate options:
;; Set the certificate file name. the output files extensions are CertFileName.p12 and CertFileName.pfx.
;# {CertFileName} {} {set the certificate file name} {} "OpenSim"
CertFileName = "OpenSim"
;; Set the certificate password.
;# {CertPassword} {} {set the certificate password} {} ""
CertPassword = "mycertpass"
;; The certificate host name (domain or IP of this machine CN). Must be the same as "ExternalHostName" in Regions.ini
;# {CertHostName} {} {set the certificate host name} {} "myRegionsExternalHostName"
CertHostName = "myRegionsExternalHostName"
;; The certificate host IP (IP of this machine).
;# {CertHostIp} {} {set the certificate host IP} {}
CertHostIp = "127.0.0.1"
;; Enable selfsigned certificate creation for local and external use. When set to true, will create a folder SSL\ and 2 sub folders SSL\ssl\ and SSL\src\.
;; Next creates and store an RSA private key in SSL\src\ and the derived selfsigned certificate in SSL\ssl\ folder.
;;Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.
;# {EnbleSelfsignedCertSupport} {} {Enable selfsigned certificate creation and renew} {true false} false
EnableSelfsignedCertSupport = false
;; Renew the selfsigned certificate on every server startup ?
;# {CertRenewOnStartup} {} {renew the selfsigned certificate on the server startup} {true false} true
CertRenewOnStartup = false
;; Certificate options:
;; Set the certificate file name. the output files extensions are CertFileName.p12 and CertFileName.pfx.
;# {CertFileName} {} {set the certificate file name} {} "OpenSim"
CertFileName = "OpenSim"
;; Set the certificate password.
;# {CertPassword} {} {set the certificate password} {} ""
CertPassword = "mycertpass"
;; The certificate host name (domain or IP of this machine CN). Must be the same as "ExternalHostName" in Regions.ini
;# {CertHostName} {} {set the certificate host name} {} "myRegionsExternalHostName"
CertHostName = "myRegionsExternalHostName"
;; The certificate host IP (IP of this machine).
;# {CertHostIp} {} {set the certificate host IP} {}
CertHostIp = "127.0.0.1"
;; SSL certificate validation options

View File

@@ -404,24 +404,26 @@
; # SSL selfsigned certificate settings.
; #
; Enable selfsigned certificate creation for local and external use. When set to true, will create a folder SSL\ and 2 sub folders SSL\ssl\ and SSL\src\. Next creates and store an RSA private key in SSL\src\ and the derived selfsigned certificate in SSL\ssl\ folder. Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.
EnableSelfsignedCertSupport = false
; Is free... so why not :). Renew the selfsigned certificate on every server startup ?
CertRenewOnStartup = true
; # Certificate options:
; Set the certificate file name. the output files extensions are CertFileName.p12 and CertFileName.pfx.
CertFileName = "OpenSim"
; Set the certificate password.
CertPassword = "mycertpass"
; The certificate host name (domain or IP of this machine CN). Must be the same as "ExternalHostName" in Regions.ini
CertHostName = "myRegionsExternalHostName"
; The certificate host IP (IP of this machine).
CertHostIp = "127.0.0.1"
; Enable selfsigned certificate creation for local and external use. When set to true, will create a folder SSL\ and 2 sub folders SSL\ssl\ and SSL\src\.
; Next creates and store an RSA private key in SSL\src\ and the derived selfsigned certificate in SSL\ssl\ folder.
; Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.
EnableSelfsignedCertSupport = false
;Renew the selfsigned certificate on every server startup ?
CertRenewOnStartup = false
; # Certificate options:
; Set the certificate file name. the output files extensions are CertFileName.p12 and CertFileName.pfx.
CertFileName = "OpenSim"
; Set the certificate password.
CertPassword = "mycertpass"
; The certificate host name (domain or IP of this machine CN). Must be the same as "ExternalHostName" in Regions.ini
CertHostName = "myRegionsExternalHostName"
; The certificate host IP (IP of this machine).
CertHostIp = "127.0.0.1"
; #
; # SSL certificates validation options

View File

@@ -80,30 +80,32 @@
; ConsoleHistoryTimeStamp = false
;; SSL selfsigned certificate settings.
; Enable selfsigned certificate creation for local and external use. When set to true, will create a folder SSL\ and 2 sub folders SSL\ssl\ and SSL\src\. Next creates and store an RSA private key in SSL\src\ and the derived selfsigned certificate in SSL\ssl\ folder. Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.
EnableRobustSelfsignedCertSupport = false
; Is free... so why not :). Renew the selfsigned certificate on every server startup ?
RobustCertRenewOnStartup = true
;; Certificate options:
; Set the certificate file name. the output files extensions are CertFileName.p12 and RobustCertFileName.pfx. This must be different than CertFileName in OpenSim.ini
RobustCertFileName = "Robust"
; Set the certificate password.
RobustCertPassword = "mycertpass"
; The certificate host name (CN).
RobustCertHostName = ${Const|BaseHostname}
; The certificate host IP.
RobustCertHostIp = "127.0.0.1"
; Enable selfsigned certificate creation for local and external use. When set to true, will create a folder SSL\ and 2 sub folders SSL\ssl\ and SSL\src\.
; Next creates and store an RSA private key in SSL\src\ and the derived selfsigned certificate in SSL\ssl\ folder.
; Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.
EnableRobustSelfsignedCertSupport = false
;Renew the selfsigned certificate on every server startup ?
RobustCertRenewOnStartup = false
;; Certificate options:
; Set the certificate file name. the output files extensions are CertFileName.p12 and RobustCertFileName.pfx. This must be different than CertFileName in OpenSim.ini
RobustCertFileName = "Robust"
; Set the certificate password.
RobustCertPassword = "mycertpass"
; The certificate host name (CN).
RobustCertHostName = ${Const|BaseHostname}
; The certificate host IP.
RobustCertHostIp = "127.0.0.1"
; peers SSL certificate validation options
; you can allow selfsigned certificates or no official CA with next option set to true
NoVerifyCertChain = true
; you can also bypass the hostname or domain verification
NoVerifyCertHostname = false
NoVerifyCertHostname = true
; having both options true does provide encryption but with low security
; set both true if you don't care to use SSL, they are needed to contact regions or grids that do use it.

View File

@@ -73,30 +73,32 @@
; ConsoleHistoryTimeStamp = false
;; SSL selfsigned certificate settings.
; Enable selfsigned certificate creation for local and external use. When set to true, will create a folder SSL\ and 2 sub folders SSL\ssl\ and SSL\src\. Next creates and store an RSA private key in SSL\src\ and the derived selfsigned certificate in SSL\ssl\ folder. Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.
EnableRobustSelfsignedCertSupport = false
; Is free... so why not :). Renew the selfsigned certificate on every server startup ?
RobustCertRenewOnStartup = true
;; Certificate options:
; Set the certificate file name. the output files extensions are RobustCertFileName.p12 and RobustCertFileName.pfx.
RobustCertFileName = "Robust"
; Set the certificate password.
RobustCertPassword = "mycertpass"
; The certificate host name (CN).
RobustCertHostName = ${Const|BaseHostname}
; The certificate host IP.
RobustCertHostIp = "127.0.0.1"
; Enable selfsigned certificate creation for local and external use. When set to true, will create a folder SSL\ and 2 sub folders SSL\ssl\ and SSL\src\.
; Next creates and store an RSA private key in SSL\src\ and the derived selfsigned certificate in SSL\ssl\ folder.
; Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.
EnableRobustSelfsignedCertSupport = false
; Renew the selfsigned certificate on every server startup ?
RobustCertRenewOnStartup = false
;; Certificate options:
; Set the certificate file name. the output files extensions are RobustCertFileName.p12 and RobustCertFileName.pfx.
RobustCertFileName = "Robust"
; Set the certificate password.
RobustCertPassword = "mycertpass"
; The certificate host name (CN).
RobustCertHostName = ${Const|BaseHostname}
; The certificate host IP.
RobustCertHostIp = "127.0.0.1"
; peers SSL certificate validation options
; you can allow selfsigned certificates or no official CA with next option set to true
NoVerifyCertChain = true
; you can also bypass the hostname or domain verification
NoVerifyCertHostname = false
NoVerifyCertHostname = true
; having both options true does provide encryption but with low security
; set both true if you don't care to use SSL, they are needed to contact regions or grids that do use it.