[Python-checkins] r85417 - python/branches/py3k/Modules/_ssl.c

antoine.pitrou python-checkins at python.org
Wed Oct 13 14:46:13 CEST 2010


Author: antoine.pitrou
Date: Wed Oct 13 14:46:13 2010
New Revision: 85417

Log:
Define a "session_id_context" at context creation. This is recommended
for the OpenSSL server-side session cache.



Modified:
   python/branches/py3k/Modules/_ssl.c

Modified: python/branches/py3k/Modules/_ssl.c
==============================================================================
--- python/branches/py3k/Modules/_ssl.c	(original)
+++ python/branches/py3k/Modules/_ssl.c	Wed Oct 13 14:46:13 2010
@@ -1478,6 +1478,11 @@
     SSL_CTX_set_verify(self->ctx, SSL_VERIFY_NONE, NULL);
     SSL_CTX_set_options(self->ctx, SSL_OP_ALL);
 
+#define SID_CTX "Python"
+    SSL_CTX_set_session_id_context(self->ctx, (const unsigned char *) SID_CTX,
+                                   sizeof(SID_CTX));
+#undef SID_CTX
+
     return (PyObject *)self;
 }
 


More information about the Python-checkins mailing list