Ah, thanks for that. I had set it previously, but then forgot to add .wsgi
when I changed the handlers for mod_wsgi to use that extension. My ssl
configuration was restricted to certain filename extensions.
I had expected to get it by calling environ['mod_ssl.var_lookup'] based on
a document I'd read elsewhere, but then discovered that the implementation
has been commented out in the source, and so that's why I was wondering
about adding support.
Anyway, if you're interested, here's a patch to fix the crash in the
ssl_var_lookup code. There was some incorrect reference counting around
PyArg_ParseTuple(args, "O:ssl_var_lookup", &item).
Thanks again for the tip on StdEnvVars.
Wade
On Wednesday, 27 March 2013 22:08:25 UTC-7, Graham Dumpleton wrote:
>
> As far as I can tell, this is all handled by Apache. So long as you have:
>
> SSLOptions StdEnvVars
>
> then the variable 'SSL_TLS_SNI' should be passed in the WSGI environ.
>
> That is the only thing that I can see would be different from the
> perspective of mod_wsgi.
>
> What more are you expecting?
>
> Graham
>
>
>
> On 28 March 2013 15:10, Wade C <[email protected] <javascript:>> wrote:
>
>> I was wondering if this is planned (ref
>> http://en.wikipedia.org/wiki/Server_Name_Indication). If so, is there
>> any documentation for how this information can be retrieved by the wsgi
>> application?
>>
>> If not, would you be willing to accept a patch to support this?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "modwsgi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/modwsgi?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
diff -r b4f55d756fa8 mod_wsgi.c
--- a/mod_wsgi.c Thu Oct 18 23:12:45 2012 +1100
+++ b/mod_wsgi.c Thu Mar 28 14:47:13 2013 -0700
@@ -3692,7 +3692,6 @@
* mod_ssl when in use.
*/
-#if 0
#if AP_SERVER_MAJORVERSION_NUMBER >= 2
if (!wsgi_daemon_pool) {
object = PyObject_GetAttrString((PyObject *)self, "ssl_is_https");
@@ -3704,7 +3703,6 @@
Py_DECREF(object);
}
#endif
-#endif
return vars;
}
@@ -4190,6 +4188,7 @@
if (!PyArg_ParseTuple(args, "O:ssl_var_lookup", &item))
return NULL;
+ Py_INCREF(item);
#if PY_MAJOR_VERSION >= 3
if (PyUnicode_Check(item)) {
@@ -4215,6 +4214,7 @@
}
name = PyString_AsString(item);
+ Py_DECREF(item);
ssl_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
@@ -8705,7 +8705,6 @@
* mod_ssl when in use.
*/
-#if 0
#if AP_SERVER_MAJORVERSION_NUMBER >= 2
object = PyObject_GetAttrString((PyObject *)self, "ssl_is_https");
PyDict_SetItemString(vars, "mod_ssl.is_https", object);
@@ -8715,7 +8714,6 @@
PyDict_SetItemString(vars, "mod_ssl.var_lookup", object);
Py_DECREF(object);
#endif
-#endif
return vars;
}
@@ -8758,6 +8756,7 @@
if (!PyArg_ParseTuple(args, "O:ssl_var_lookup", &item))
return NULL;
+ Py_INCREF(item);
#if PY_MAJOR_VERSION >= 3
if (PyUnicode_Check(item)) {
@@ -8783,6 +8782,7 @@
}
name = PyString_AsString(item);
+ Py_DECREF(item);
ssl_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
@@ -14196,6 +14196,7 @@
if (!PyArg_ParseTuple(args, "O:ssl_var_lookup", &item))
return NULL;
+ Py_INCREF(item);
#if PY_MAJOR_VERSION >= 3
if (PyUnicode_Check(item)) {
@@ -14221,6 +14222,7 @@
}
name = PyString_AsString(item);
+ Py_DECREF(item);
ssl_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);