Index: openacs-4/packages/acs-tcl/tcl/admin-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/admin-init.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-tcl/tcl/admin-init.tcl 30 Nov 2002 17:23:55 -0000 1.5 +++ openacs-4/packages/acs-tcl/tcl/admin-init.tcl 3 Oct 2003 09:21:39 -0000 1.6 @@ -10,7 +10,7 @@ # This can be very time consuming on a large site and may be # disabled by setting RegisterRestrictToSSLFilters in the kernel params. -if { [ad_ssl_available_p] +if { [security::https_available_p] && [parameter::get -package_id [ad_acs_kernel_id] -parameter RegisterRestrictToSSLFilters -default 1]} { set admin_ssl_filters_installed_p 1 Index: openacs-4/packages/acs-tcl/tcl/admin-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/admin-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 18 Sep 2003 13:44:30 -0000 1.12 +++ openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 3 Oct 2003 09:21:39 -0000 1.13 @@ -8,16 +8,10 @@ } -proc_doc ad_ssl_available_p {} { +ad_proc -deprecated -warn ad_ssl_available_p {} { Returns 1 if this AOLserver has the SSL module installed. } { - if { [ns_config ns/server/[ns_info server]/modules nsssl] != "" || - [ns_config ns/server/[ns_info server]/modules nsssle] != "" || - [ns_config ns/server/[ns_info server]/modules nsopenssl] != "" } { - return 1 - } else { - return 0 - } + return [security::https_available_p] } proc_doc ad_restrict_to_https {conn args why} { Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 29 Sep 2003 14:09:35 -0000 1.27 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 3 Oct 2003 09:21:39 -0000 1.28 @@ -1288,6 +1288,14 @@ # ##### +ad_proc -public security::https_available_p {} { + Return 1 if AOLserver is configured to support HTTPS and 0 otherwise. + + @author Peter Marklund +} { + return [expr ![empty_string_p [get_https_port]]] +} + ad_proc -public security::secure_conn_p {} { Returns true if the connection [ad_conn] is secure (HTTPS), or false otherwise. } { @@ -1307,9 +1315,14 @@ ad_proc -public security::require_secure_conn {} { Redirect back to the current page in secure mode (HTTPS) if we are not already in secure mode. + Does nothing if the server is not configured for HTTPS support. @author Peter Marklund } { + if { ![https_available_p] } { + return + } + if { ![security::secure_conn_p] } { security::redirect_to_secure [ad_return_url -qualified] } @@ -1319,9 +1332,14 @@ url } { Redirect to the given URL and enter secure (HTTPS) mode. + Does nothing if the server is not configured for HTTPS support. @author Peter Marklund } { + if { ![https_available_p] } { + return + } + set secure_url [get_secure_qualified_url $url] ad_returnredirect $secure_url