1 |
commit: f0838f01e55b706bb9314859a7a51dd565f415e7 |
2 |
Author: Benedikt Boehm <hollow <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 1 13:50:09 2009 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 1 13:50:09 2009 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/apache.git;a=commit;h=f0838f01 |
7 |
|
8 |
bump sni patch, #252363 |
9 |
|
10 |
--- |
11 |
2.2/patches/04_all_mod_ssl_tls_sni.patch | 98 +++++++++++++++++++++++++------- |
12 |
1 file changed, 77 insertions(+), 21 deletions(-) |
13 |
|
14 |
diff --git a/2.2/patches/04_all_mod_ssl_tls_sni.patch b/2.2/patches/04_all_mod_ssl_tls_sni.patch |
15 |
index 6e5b86c..73392ae 100644 |
16 |
--- a/2.2/patches/04_all_mod_ssl_tls_sni.patch |
17 |
+++ b/2.2/patches/04_all_mod_ssl_tls_sni.patch |
18 |
@@ -9,10 +9,10 @@ |
19 |
# must be configured explicitly for TLS extension support at compile time |
20 |
# ("./config enable-tlsext"). |
21 |
|
22 |
-Index: httpd-2.2.8/modules/ssl/ssl_private.h |
23 |
+Index: httpd-2.2.x/modules/ssl/ssl_private.h |
24 |
=================================================================== |
25 |
---- httpd-2.2.8.orig/modules/ssl/ssl_private.h |
26 |
-+++ httpd-2.2.8/modules/ssl/ssl_private.h |
27 |
+--- httpd-2.2.x/modules/ssl/ssl_private.h (revision 663014) |
28 |
++++ httpd-2.2.x/modules/ssl/ssl_private.h (working copy) |
29 |
@@ -35,6 +35,7 @@ |
30 |
#include "http_connection.h" |
31 |
#include "http_request.h" |
32 |
@@ -31,10 +31,10 @@ Index: httpd-2.2.8/modules/ssl/ssl_private.h |
33 |
|
34 |
/** Session Cache Support */ |
35 |
void ssl_scache_init(server_rec *, apr_pool_t *); |
36 |
-Index: httpd-2.2.8/modules/ssl/ssl_engine_init.c |
37 |
+Index: httpd-2.2.x/modules/ssl/ssl_engine_init.c |
38 |
=================================================================== |
39 |
---- httpd-2.2.8.orig/modules/ssl/ssl_engine_init.c |
40 |
-+++ httpd-2.2.8/modules/ssl/ssl_engine_init.c |
41 |
+--- httpd-2.2.x/modules/ssl/ssl_engine_init.c (revision 663014) |
42 |
++++ httpd-2.2.x/modules/ssl/ssl_engine_init.c (working copy) |
43 |
@@ -355,6 +355,33 @@ static void ssl_init_server_check(server |
44 |
} |
45 |
} |
46 |
@@ -79,9 +79,18 @@ Index: httpd-2.2.8/modules/ssl/ssl_engine_init.c |
47 |
} |
48 |
} |
49 |
|
50 |
-@@ -1038,7 +1068,11 @@ void ssl_init_CheckServers(server_rec *b |
51 |
+@@ -1036,9 +1066,19 @@ void ssl_init_CheckServers(server_rec *b |
52 |
+ klen = strlen(key); |
53 |
+ |
54 |
if ((ps = (server_rec *)apr_hash_get(table, key, klen))) { |
55 |
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, |
56 |
+- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, |
57 |
++ ap_log_error(APLOG_MARK, |
58 |
++#ifdef OPENSSL_NO_TLSEXT |
59 |
++ APLOG_WARNING, |
60 |
++#else |
61 |
++ APLOG_DEBUG, |
62 |
++#endif |
63 |
++ 0, |
64 |
base_server, |
65 |
+#ifdef OPENSSL_NO_TLSEXT |
66 |
"Init: SSL server IP/port conflict: " |
67 |
@@ -91,7 +100,7 @@ Index: httpd-2.2.8/modules/ssl/ssl_engine_init.c |
68 |
"%s (%s:%d) vs. %s (%s:%d)", |
69 |
ssl_util_vhostid(p, s), |
70 |
(s->defn_name ? s->defn_name : "unknown"), |
71 |
-@@ -1055,8 +1089,14 @@ void ssl_init_CheckServers(server_rec *b |
72 |
+@@ -1055,8 +1095,14 @@ void ssl_init_CheckServers(server_rec *b |
73 |
|
74 |
if (conflict) { |
75 |
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, |
76 |
@@ -106,10 +115,10 @@ Index: httpd-2.2.8/modules/ssl/ssl_engine_init.c |
77 |
} |
78 |
} |
79 |
|
80 |
-Index: httpd-2.2.8/modules/ssl/ssl_engine_vars.c |
81 |
+Index: httpd-2.2.x/modules/ssl/ssl_engine_vars.c |
82 |
=================================================================== |
83 |
---- httpd-2.2.8.orig/modules/ssl/ssl_engine_vars.c |
84 |
-+++ httpd-2.2.8/modules/ssl/ssl_engine_vars.c |
85 |
+--- httpd-2.2.x/modules/ssl/ssl_engine_vars.c (revision 663014) |
86 |
++++ httpd-2.2.x/modules/ssl/ssl_engine_vars.c (working copy) |
87 |
@@ -320,6 +320,12 @@ static char *ssl_var_lookup_ssl(apr_pool |
88 |
else if (ssl != NULL && strcEQ(var, "COMPRESS_METHOD")) { |
89 |
result = ssl_var_lookup_ssl_compress_meth(ssl); |
90 |
@@ -123,10 +132,10 @@ Index: httpd-2.2.8/modules/ssl/ssl_engine_vars.c |
91 |
return result; |
92 |
} |
93 |
|
94 |
-Index: httpd-2.2.8/modules/ssl/ssl_engine_kernel.c |
95 |
+Index: httpd-2.2.x/modules/ssl/ssl_engine_kernel.c |
96 |
=================================================================== |
97 |
---- httpd-2.2.8.orig/modules/ssl/ssl_engine_kernel.c |
98 |
-+++ httpd-2.2.8/modules/ssl/ssl_engine_kernel.c |
99 |
+--- httpd-2.2.x/modules/ssl/ssl_engine_kernel.c (revision 663014) |
100 |
++++ httpd-2.2.x/modules/ssl/ssl_engine_kernel.c (working copy) |
101 |
@@ -31,6 +31,9 @@ |
102 |
#include "ssl_private.h" |
103 |
|
104 |
@@ -162,7 +171,31 @@ Index: httpd-2.2.8/modules/ssl/ssl_engine_kernel.c |
105 |
SSL_set_app_data2(ssl, r); |
106 |
|
107 |
/* |
108 |
-@@ -997,6 +1011,9 @@ int ssl_hook_Fixup(request_rec *r) |
109 |
+@@ -353,6 +367,11 @@ int ssl_hook_Access(request_rec *r) |
110 |
+ * currently active/remembered verify depth (because this means more |
111 |
+ * restriction on the certificate chain). |
112 |
+ */ |
113 |
++ if ((sc->server->auth.verify_depth != UNSET) && |
114 |
++ (dc->nVerifyDepth == UNSET)) { |
115 |
++ /* apply per-vhost setting, if per-directory config is not set */ |
116 |
++ dc->nVerifyDepth = sc->server->auth.verify_depth; |
117 |
++ } |
118 |
+ if (dc->nVerifyDepth != UNSET) { |
119 |
+ /* XXX: doesnt look like sslconn->verify_depth is actually used */ |
120 |
+ if (!(n = sslconn->verify_depth)) { |
121 |
+@@ -382,6 +401,11 @@ int ssl_hook_Access(request_rec *r) |
122 |
+ * verification but at least skip the I/O-intensive renegotation |
123 |
+ * handshake. |
124 |
+ */ |
125 |
++ if ((sc->server->auth.verify_mode != SSL_CVERIFY_UNSET) && |
126 |
++ (dc->nVerifyClient == SSL_CVERIFY_UNSET)) { |
127 |
++ /* apply per-vhost setting, if per-directory config is not set */ |
128 |
++ dc->nVerifyClient = sc->server->auth.verify_mode; |
129 |
++ } |
130 |
+ if (dc->nVerifyClient != SSL_CVERIFY_UNSET) { |
131 |
+ /* remember old state */ |
132 |
+ verify_old = SSL_get_verify_mode(ssl); |
133 |
+@@ -997,6 +1021,9 @@ int ssl_hook_Fixup(request_rec *r) |
134 |
SSLDirConfigRec *dc = myDirConfig(r); |
135 |
apr_table_t *env = r->subprocess_env; |
136 |
char *var, *val = ""; |
137 |
@@ -172,7 +205,7 @@ Index: httpd-2.2.8/modules/ssl/ssl_engine_kernel.c |
138 |
STACK_OF(X509) *peer_certs; |
139 |
SSL *ssl; |
140 |
int i; |
141 |
-@@ -1018,6 +1035,13 @@ int ssl_hook_Fixup(request_rec *r) |
142 |
+@@ -1018,6 +1045,13 @@ int ssl_hook_Fixup(request_rec *r) |
143 |
/* the always present HTTPS (=HTTP over SSL) flag! */ |
144 |
apr_table_setn(env, "HTTPS", "on"); |
145 |
|
146 |
@@ -186,7 +219,7 @@ Index: httpd-2.2.8/modules/ssl/ssl_engine_kernel.c |
147 |
/* standard SSL environment variables */ |
148 |
if (dc->nOptions & SSL_OPT_STDENVVARS) { |
149 |
for (i = 0; ssl_hook_Fixup_vars[i]; i++) { |
150 |
-@@ -1810,3 +1834,118 @@ void ssl_callback_LogTracingState(MODSSL |
151 |
+@@ -1810,3 +1844,141 @@ void ssl_callback_LogTracingState(MODSSL |
152 |
} |
153 |
} |
154 |
|
155 |
@@ -299,16 +332,39 @@ Index: httpd-2.2.8/modules/ssl/ssl_engine_kernel.c |
156 |
+ SSL_CTX_get_verify_callback(ssl->ctx)); |
157 |
+ } |
158 |
+ |
159 |
++ /* |
160 |
++ * We also need to make sure that the correct mctx |
161 |
++ * (accessed through the c->base_server->module_config vector) |
162 |
++ * is assigned to the connection - the CRL callback e.g. |
163 |
++ * makes use of it for retrieving its store (mctx->crl). |
164 |
++ * Since logging in callbacks uses c->base_server in many |
165 |
++ * cases, it also ensures that these messages are routed |
166 |
++ * to the proper log. |
167 |
++ */ |
168 |
++ c->base_server = s; |
169 |
++ |
170 |
++ /* |
171 |
++ * There is one special filter callback, which is set |
172 |
++ * very early depending on the base_server's log level. |
173 |
++ * If this is not the first vhost we're now selecting |
174 |
++ * (and the first vhost doesn't use APLOG_DEBUG), then |
175 |
++ * we need to set that callback here. |
176 |
++ */ |
177 |
++ if (c->base_server->loglevel >= APLOG_DEBUG) { |
178 |
++ BIO_set_callback(SSL_get_rbio(ssl), ssl_io_data_cb); |
179 |
++ BIO_set_callback_arg(SSL_get_rbio(ssl), (void *)ssl); |
180 |
++ } |
181 |
++ |
182 |
+ return 1; |
183 |
+ } |
184 |
+ |
185 |
+ return 0; |
186 |
+} |
187 |
+#endif |
188 |
-Index: httpd-2.2.8/modules/ssl/ssl_toolkit_compat.h |
189 |
+Index: httpd-2.2.x/modules/ssl/ssl_toolkit_compat.h |
190 |
=================================================================== |
191 |
---- httpd-2.2.8.orig/modules/ssl/ssl_toolkit_compat.h |
192 |
-+++ httpd-2.2.8/modules/ssl/ssl_toolkit_compat.h |
193 |
+--- httpd-2.2.x/modules/ssl/ssl_toolkit_compat.h (revision 663014) |
194 |
++++ httpd-2.2.x/modules/ssl/ssl_toolkit_compat.h (working copy) |
195 |
@@ -264,6 +264,12 @@ typedef void (*modssl_popfree_fn)(char * |
196 |
#define SSL_SESS_CACHE_NO_INTERNAL SSL_SESS_CACHE_NO_INTERNAL_LOOKUP |
197 |
#endif |