You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Paul <yd...@yahoo.com> on 2001/04/04 17:35:33 UTC

accessing SSL environment data in Perl*Handler

Though I feel rather foolish, the fact remains that I can't seem to
find my SSL environment variables.

httpd.conf has

<Directory />
   SSLVerifyClient   require
   SSLOptions        +StdEnvVars 
# ...
</Directory>

Exactly when and where are they set? For example, SSL_CLIENT_S_DN. Once
set, shouldn't I be able to just say $ENV{SSL_CLIENT_S_DN}? 

My PerlPostReadRequestHandler can't seem to see them, but I figure
that's just because they haven't been set yet. I can't find when
they're set anywhere in the docs. (I probably haven't looked in the
right place, but it's not for lack of trying. =o)

Input, anyone?

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Re: accessing SSL environment data in Perl*Handler

Posted by Nikolaus Rath <Ni...@rath.org>.
* Paul <yd...@yahoo.com> wrote:
> Though I feel rather foolish, the fact remains that I can't seem to
> find my SSL environment variables.
> 
> httpd.conf has
> 
> <Directory />
>    SSLVerifyClient   require
>    SSLOptions        +StdEnvVars 
> # ...
> </Directory>
> 
> Exactly when and where are they set? 

In the fixup handler.

> For example, SSL_CLIENT_S_DN. Once set, shouldn't I be able to just
> say $ENV{SSL_CLIENT_S_DN}?
> 
> My PerlPostReadRequestHandler can't seem to see them,

Yes, because it is run before the fixup handler. You must use a sub
request to get the values.


  - Nikolaus

-- 
Bitte wenden.


Re: accessing SSL environment data in Perl*Handler

Posted by Doug MacEachern <do...@covalent.net>.
On Wed, 4 Apr 2001, Paul wrote:

> Though I feel rather foolish, the fact remains that I can't seem to
> find my SSL environment variables.
> 
> httpd.conf has
> 
> <Directory />
>    SSLVerifyClient   require
>    SSLOptions        +StdEnvVars 
> # ...
> </Directory>
> 
> Exactly when and where are they set? For example, SSL_CLIENT_S_DN. Once
> set, shouldn't I be able to just say $ENV{SSL_CLIENT_S_DN}? 
> 
> My PerlPostReadRequestHandler can't seem to see them, but I figure
> that's just because they haven't been set yet. I can't find when
> they're set anywhere in the docs. (I probably haven't looked in the
> right place, but it's not for lack of trying. =o)

mod_ssl doesn't setup its variables until the fixup stage, you need to run
a subrequest to get at them eariler.  the auth chapter at www.modperl.com
has a specific example.