Hi Graham,
Graham Dumpleton wrote:
> On 23 June 2010 08:11, Gelonida <[email protected]> wrote:
>> Hi,
>>
>> I'm having a setup where apache accepts only certain client certificates.
>>
>> I would like to write a wsgi script, which will greet the browsing
>> person by its name.
>> This means I'd like to extract information from the client certificate.
>>
>> With mod_python I could extract fields like
>> SSL_CLIENT_S_DN_O or SSL_CLIENT_S_DN_CN
>> With mod_python these variables were not available by default, but could
>> be 'requested' with the add_common_vars() command
>>
>>
>> What is the mod_wsgi way of extracting such info?
>
> Provided you have set in Apache configuration:
>
> SSLOptions StdEnvVars
>
> as you would have had to with mod_python, they should be in the WSGI
> environ dictionary.
Yes, this did the trick.
Thanks a lot.
Funnily though "SSLOptions StdEnvVars"
was NOT set for mod_python
I was able to obtain them with
req.add_common_vars()
the only occurrences of StdEnvvars in the server's config file were:
( and no matches in any other file below /etc/pache2 )
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
and
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
My python modules however were in a different directory and
had .py as suffix.
Thanks a lot again,
you saved my day
G
>
> If you are using a Python web framework you will need to find out from
> its documentation how to access the original WSGI environ dictionary
> values.
>
> Graham
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.