Basic implementation of SSL selfsigned certificates creation and renewal

Allows selfsigned certificates creation and renewal for local and external use. When enabled, 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 certificates in SSL\ssl\ folder. Is also possible to renew the certificate on every server restart if CertRenewOnStartup is set to true.

Note: The SSL related params in the network section was adapted to be user friendly and allow the usage just by uncommenting the SSL params in both sections and a password change.
This commit is contained in:
Adil El Farissi
2024-03-20 01:12:49 +00:00
committed by UbitUmarov
parent e2b655a939
commit c2c3ca418a
5 changed files with 142 additions and 11 deletions

View File

@@ -310,6 +310,33 @@
; TelehubAllowLandmark = 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.
;# {EnbleSelfsignedCertSupport} {} {Enable selfsigned certificate creation and renew} {true false} false
;EnbleSelfsignedCertSupport = true
;; 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).
;# {CertHostName} {} {set the certificate host name} {} ${Const|BaseHostname}
;CertHostName = ${Const|BaseHostname}
;; The certificate host IP (IP of this machine).
;# {CertHostIp} {} {set the certificate host IP} {}
;CertHostIp = "127.0.0.1"
;; SSL certificate validation options
;; you can allow selfsigned certificates or no official CA with next option set to true
;# {NoVerifyCertChain} {} {do not verify SSL Cert Chain} {true false} true
@@ -317,7 +344,7 @@
;; you can also bypass the hostname or domain verification
;# {NoVerifyCertHostname} {} {do not verify SSL Cert name versus peer name} {true false} true
; NoVerifyCertHostname = true
; NoVerifyCertHostname = false
;; 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.
@@ -581,24 +608,24 @@
; the main unsecure port will still open for some services. this may change in future.
; set http_listener_ssl to enable main server ssl. it will replace unsecure port on most functions
;# {http_listener_ssl}{} {enable main server ssl port)} {} false
;# {http_listener_ssl}{} {enable main server ssl port} {} false
;http_listener_ssl = false
; Set port for main SSL connections
;# {http_listener_sslport}{} {main server ssl port)} {} 9001
;# {http_listener_sslport}{} {main server ssl port} {} 9001
;http_listener_sslport = 9001 ;
; currently if using ssl, regions ExternalHostName must the the same and equal to http_listener_cn
; this may be removed in future
;# {http_listener_cn}{} {main server ssl externalHostName)} {} ""
;http_listener_cn = "myRegionsExternalHostName"
;# {http_listener_cn}{} {main server ssl externalHostName} {} ""
;http_listener_cn = ${Const|BaseHostname}
; the path for the certificate path
;# {http_listener_cert_path}{} {main server ssl certificate file path)} {} ""
;http_listener_cert_path = "mycert.p12"
;# {http_listener_cert_path}{} {main server ssl certificate file path} {} ""
;http_listener_cert_path = "SSL\ssl\OpenSim.p12"
;# {http_listener_cert_pass}{} {main server ssl certificate password)} {} ""
;http_listener_cert_pass = "mycertpass" ; the cert passwork
;# {http_listener_cert_pass}{} {main server ssl certificate password} {} ""
;http_listener_cert_pass = "mycertpass"
; By default, OpenSimulator does not allow scripts to make HTTP calls to addresses on the simulator's LAN.
; See the OutboundDisallowForUserScripts parameter in OpenSimDefaults.ini for more information on this filter.