I use mod_ssl 2.7.1 for Apache 1.3.14 on Solaris 2.6. I'm
writing an authentication module that needs to get the
DN from user's certificate when the user is trying to
access a resource within the DocumentRoot.
In httpd.conf, I specify something like this:
...
<Directory "/usr/local/apache/htdocs">
<IfDefine SSL>
SSLOptions +StdEnvVars +CompatEnvVars +ExportCertData
</IfDefine>
</Directory>
...
<IfDefine SSL>
<VirtualHost _default_:8443>
DocumentRoot "/usr/local/apache/htdocs"
ServerName boanetra.acme.com
ServerAdmin [EMAIL PROTECTED]
ErrorLog /usr/local/apache/logs/error_log
TransferLog /usr/local/apache/logs/access_log
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
SSLCACertificatePath /usr/local/apache/conf/ssl.crt
SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-root.crt
SSLVerifyClient require
SSLVerifyDepth 10
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/apache/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfDefine>
In my authentication module, I try to access the SSL_* env vars,
for example, SSL_CLIENT_S_DN, with:
char *userDN = (char *)ap_table_get(request->subprocess_env,
"SSL_CLIENT_S_DN");
It returns null.
I then move the <Directory "/usr/local/apache/htdocs"> block
into the <VirtualHost _default_:8443> block. Same, I got nothing
back.
When I access a perl script (under cgi-bin) that prints out all the
env vars, I can see all the SSL_* env vars. Why can I get the same
thing when user is accessing a resource under the DocumentRoot?
What's the correct way to get the SSL_* values within my own
module?
Any help would be appreciated.
-Muwon
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]