summaryrefslogtreecommitdiffstats
path: root/main/lighttpd/CVE-2013-4508b.patch
blob: dc732340b0f0860a1b7dab2b6900cf2f08af4db6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Index: lighttpd-1.4.x/src/network.c
===================================================================
--- lighttpd-1.4.x/src/network.c	(revision 2924)
+++ lighttpd-1.4.x/src/network.c	(revision 2925)
@@ -741,6 +741,14 @@
 			return -1;
 		}
 
+		/* completely useless identifier; required for client cert verification to work with sessions */
+		if (0 == SSL_CTX_set_session_id_context(s->ssl_ctx, (const unsigned char*) CONST_STR_LEN("lighttpd"))) {
+			log_error_write(srv, __FILE__, __LINE__, "ss:s", "SSL:",
+				"failed to set session context",
+				ERR_error_string(ERR_get_error(), NULL));
+			return -1;
+		}
+
 		if (s->ssl_empty_fragments) {
 #ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
 			ssloptions &= ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;