package Apache2::ModSSL; use strict; use warnings FATAL => 'all'; use XSLoader (); our $VERSION = '0.07'; XSLoader::load __PACKAGE__, $VERSION if( exists $ENV{MOD_PERL} and $ENV{MOD_PERL}=~/mod_perl/ ); 1; __END__ =head1 NAME Apache2::ModSSL - a Perl Interface to mod_ssl functions =head1 SYNOPSIS use Apache2::ModSSL; my $c=$r->connection; if( $c->is_https ) { $dn=$c->ssl_var_lookup('SSL_SERVER_S_DN'); $nsComment=$c->ssl_ext_lookup(0, '2.16.840.1.113730.1.13'); } =head1 ABSTRACT C adds a few functions that are exported from C to the C class. =head1 METHODS =over 4 =item B<$c-Eis_https> C returns 1 if the connection is SSL-encrypted, 0 if it is not encrypted but mod_ssl is available in the apache binary or C if mod_ssl is not loaded. =item B<$c-Essl_var_lookup(NAME)> C returns the value of an SSL variable. If mod_ssl is not loaded C is returned. A query for an unknown variable returns an empty string. For a list of known variables please refer to the mod_ssl documentation or mod_ssl source code (C). At the time of this writing this list includes (not complete): =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B (where n is a number) =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =item B<$c-Essl_ext_lookup(WHERE, OID)> C returns the value of an SSL certificate extension. C specifies whether to look in the WEB server certificate (C) or in the client certificate (C). C is the Object Identifier for the extension in dotted notation, e.g. C<2.16.840.1.11330.1.13> for C or C<2.5.29.19> for C. =back =head1 EXPORTS none. =head1 SEE ALSO L, L =head1 AUTHOR Torsten Foertsch, Etorsten.foertsch@gmx.netE =head1 COPYRIGHT AND LICENSE Copyright (C) 2004-2008 by Torsten Foertsch This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut