This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: How do i know for certain i am using SSL? From: Joao Pedro =?iso-8859-1?Q?Gon=E7alves?= <joaop@ptm.pt> Date: Tue, 25 Jul 2000 11:15:06 +0100 Hi, is there any method that will work through all the different apache ssl implementations? Currently what i do (with openssl) is: my $s = $r->lookup_uri($r->uri); my $ssl = $s->subprocess_env('HTTPS'); $ssl becomes 'on' , but i don't know if this is compatible with other ssl implementations. Maybe this HTTPS env could be mapped to mod_perl %ENV, or using something similar for each ssl implementation so that a developer could trust on one place to know whether the request is using ssl or not. === Subject: Re: How do i know for certain i am using SSL? From: Kenneth Lee <kenneth.lee@alfacomtech.com> Date: Tue, 25 Jul 2000 22:04:13 +0800 how about the scheme of the request URL? hmm.. but that needs parsing the URL... === Subject: Re: How do i know for certain i am using SSL? From: Vivek Khera <khera@kciLink.com> Date: Tue, 25 Jul 2000 10:45:22 -0400 (EDT) KL" == Kenneth Lee <kenneth.lee@alfacomtech.com> writes: KL> how about the scheme of the request URL? hmm.. but that needs KL> parsing the URL... Huh? Just look at the first five characters if they are "https". No more parsing than that is necessary, or am I totally missing something? That's what I'd use if I needed to do this. === Subject: Re: How do i know for certain i am using SSL? From: Joao Pedro =?iso-8859-1?Q?Gon=E7alves?= <joaop@ptm.pt> Date: Tue, 25 Jul 2000 15:53:00 +0100 Following your suggestion, use Apache::URI (); $r->parsed_uri->scheme; returns http or https. However this value comes from apache's util_uri where https is mapped to DEFAULT_HTTPS_PORT. src/include/httpd.h:#define DEFAULT_HTTPS_PORT 443 However with OpenSSL and mod_ssl, this still works because somewhere at ssl_engine_ext.c DEFAULT_HTTPS_PORT is overwritten and the schema returns https on other port when ssl is engaged. So, the question is, can i trust this? === Subject: Re: How do i know for certain i am using SSL? From: Vivek Khera <khera@kciLink.com> Date: Tue, 25 Jul 2000 10:56:51 -0400 (EDT) j" == joaop <Joao> writes: j> Following your suggestion, j> use Apache::URI (); j> $r->parsed_uri->scheme; j> returns http or https. The "s" in https says use SSL. The port number is irrelevent, just as the port number in http is irrelevent to using the HTTP protocol. ===