.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SSLLookup 3pm" .TH SSLLookup 3pm "2020-11-09" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Apache::SSLLookup \- hooks for various mod_ssl functions .SH "SYNOPSIS" .IX Header "SYNOPSIS" in httpd.conf: .PP .Vb 2 \& # pre\-loading via PerlModule or startup.pl is REQUIRED!!! \& PerlModule Apache::SSLLookup .Ve .PP in any handler: .PP .Vb 2 \& sub handler { \& my $r = Apache::SSLLookup\->new(shift); \& \& my $request_is_over_ssl = $r\->is_https; \& \& my $value = $r\->lookup_var(\*(AqSSL_CLIENT_VERIFY\*(Aq); \& \& ... \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Apache::SSLLookup is a glue layer between Perl handlers and the mod_ssl public \s-1API.\s0 under normal circumstances, you would use \f(CW\*(C`$r>subprocess_env()\*(C'\fR to glean information about mod_ssl. for example, .PP .Vb 1 \& my $request_is_over_ssl = $r\->subprocess_env(\*(AqHTTPS\*(Aq); .Ve .PP however, this is only possible after mod_ssl runs its fixups \- that is, Perl handlers can only accurately check the \&\f(CW\*(C`subprocess_env\*(C'\fR table for mod_ssl information in the PerlResponsePhase or later. .PP this module allows you to query mod_ssl directly via its public C \s-1API\s0 at any point in the request cycle. but without using C, of course. .SH "METHODS" .IX Header "METHODS" there are only three methods you need to be concerned with. .IP "\fBnew()\fR" 4 .IX Item "new()" to use this class you create an \f(CW\*(C`Apache::SSLLookup\*(C'\fR object. \&\f(CW\*(C`Apache::SSLLookup\*(C'\fR is a subclass of \f(CW\*(C`Apache::RequestRec\*(C'\fR so you can simply call \f(CW\*(C`new()\*(C'\fR and get on with your business. .Sp .Vb 1 \& my $r = Apache::SSLLookup\->new($r); .Ve .IP "\fBis_https()\fR" 4 .IX Item "is_https()" returns true if mod_ssl considers the request to be under \s-1SSL.\s0 .Sp .Vb 1 \& my $request_is_over_ssl = $r\->is_https; .Ve .Sp you can call this function any time during the request, specifically before mod_ssl populates \f(CW\*(C`subprocess_env(\*(AqHTTPS\*(Aq)\*(C'\fR in the fixup phase. .Sp you must be using Apache 2.0.51 or greater for this method to accurately reflect the \s-1SSL\s0 status of the request. .IP "\fBlookup_var()\fR" 4 .IX Item "lookup_var()" returns the value of various mod_ssl environment variables. .Sp .Vb 1 \& my $value = $r\->lookup_var(\*(AqSSL_CLIENT_VERIFY\*(Aq); .Ve .Sp you can call this function any time during the request, specifically before mod_ssl populates \f(CW\*(C`subprocess_env()\*(C'\fR in the fixup phase. .SH "NOTES" .IX Header "NOTES" this module is for Apache 2.0 exclusively. it will not work with Apache 1.3. .PP you \s-1MUST MUST MUST\s0 preload this module with PerlModule or from a startup.pl. what if you don't? the short answer is that this module will do nothing for you. the long answer is that unless you preload the module it will not be able to glean the optional function definitions from mod_ssl. I'm still trying to figure out why not... .SH "AUTHOR" .IX Header "AUTHOR" Geoffrey Young .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2004, Geoffrey Young .PP All rights reserved. .PP This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.