source: mod_gnutls/debian/patches/build_errors.patch @ 8c9eb05

debian/masterdebian/stretch-backportsjessie-backports
Last change on this file since 8c9eb05 was 8c9eb05, checked in by Daniel Kahn Gillmor <dkg@…>, 7 years ago

packaging for libapache2-mod-gnutls 0.5.10-2

  • Property mode set to 100644
File size: 3.8 KB
RevLine 
[8c9eb05]1Description: Fix build errors against newer gnutls package.
2Author: Barry deFreese <bdefreese@debian.org>
3Index: mod-gnutls-0.5.10/include/mod_gnutls.h.in
4===================================================================
5--- mod-gnutls-0.5.10.orig/include/mod_gnutls.h.in      2013-07-17 21:49:34.000000000 -0400
6+++ mod-gnutls-0.5.10/include/mod_gnutls.h.in   2013-07-17 21:49:52.000000000 -0400
7@@ -148,7 +148,7 @@
8 /**
9  * write_flush will flush data
10  */
11-static ssize_t write_flush(mgs_handle_t * ctxt);
12+/* static ssize_t write_flush(mgs_handle_t * ctxt); */
13 
14 /**
15  * mgs_filter_input will filter the input data
16Index: mod-gnutls-0.5.10/src/gnutls_io.c
17===================================================================
18--- mod-gnutls-0.5.10.orig/src/gnutls_io.c      2011-07-08 17:29:46.000000000 -0400
19+++ mod-gnutls-0.5.10/src/gnutls_io.c   2013-07-17 21:57:09.429551900 -0400
20@@ -448,6 +448,40 @@
21        }
22 }
23 
24+static ssize_t write_flush(mgs_handle_t * ctxt)
25+{
26+       apr_bucket *e;
27+
28+       if (!(ctxt->output_blen || ctxt->output_length)) {
29+               ctxt->output_rc = APR_SUCCESS;
30+               return 1;
31+       }
32+
33+       if (ctxt->output_blen) {
34+               e = apr_bucket_transient_create(ctxt->output_buffer,
35+                                               ctxt->output_blen,
36+                                               ctxt->output_bb->
37+                                               bucket_alloc);
38+               /* we filled this buffer first so add it to the
39+                * head of the brigade
40+                */
41+               APR_BRIGADE_INSERT_HEAD(ctxt->output_bb, e);
42+               ctxt->output_blen = 0;
43+       }
44+
45+       ctxt->output_length = 0;
46+       e = apr_bucket_flush_create(ctxt->output_bb->bucket_alloc);
47+       APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e);
48+
49+       ctxt->output_rc = ap_pass_brigade(ctxt->output_filter->next,
50+                                         ctxt->output_bb);
51+       /* clear the brigade to be ready for next time */
52+       apr_brigade_cleanup(ctxt->output_bb);
53+
54+       return (ctxt->output_rc == APR_SUCCESS) ? 1 : -1;
55+}
56+
57+
58 int mgs_rehandshake(mgs_handle_t * ctxt)
59 {
60        int rv;
61@@ -742,39 +776,6 @@
62 }
63 
64 
65-static ssize_t write_flush(mgs_handle_t * ctxt)
66-{
67-       apr_bucket *e;
68-
69-       if (!(ctxt->output_blen || ctxt->output_length)) {
70-               ctxt->output_rc = APR_SUCCESS;
71-               return 1;
72-       }
73-
74-       if (ctxt->output_blen) {
75-               e = apr_bucket_transient_create(ctxt->output_buffer,
76-                                               ctxt->output_blen,
77-                                               ctxt->output_bb->
78-                                               bucket_alloc);
79-               /* we filled this buffer first so add it to the
80-                * head of the brigade
81-                */
82-               APR_BRIGADE_INSERT_HEAD(ctxt->output_bb, e);
83-               ctxt->output_blen = 0;
84-       }
85-
86-       ctxt->output_length = 0;
87-       e = apr_bucket_flush_create(ctxt->output_bb->bucket_alloc);
88-       APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e);
89-
90-       ctxt->output_rc = ap_pass_brigade(ctxt->output_filter->next,
91-                                         ctxt->output_bb);
92-       /* clear the brigade to be ready for next time */
93-       apr_brigade_cleanup(ctxt->output_bb);
94-
95-       return (ctxt->output_rc == APR_SUCCESS) ? 1 : -1;
96-}
97-
98 ssize_t mgs_transport_write(gnutls_transport_ptr_t ptr,
99                            const void *buffer, size_t len)
100 {
101Index: mod-gnutls-0.5.10/src/gnutls_hooks.c
102===================================================================
103--- mod-gnutls-0.5.10.orig/src/gnutls_hooks.c   2011-07-08 17:29:46.000000000 -0400
104+++ mod-gnutls-0.5.10/src/gnutls_hooks.c        2013-07-17 22:18:51.452008280 -0400
105@@ -181,12 +181,12 @@
106        if (ctxt->sc->certs_x509[0] != NULL && ctxt->sc->cert_pgp == NULL) {
107                cprio[0] = GNUTLS_CRT_X509;
108                cprio[1] = 0;
109-               gnutls_certificate_type_set_priority(session, cprio);
110+               gnutls_set_default_priority(session);
111        } else if (ctxt->sc->cert_pgp != NULL
112                   && ctxt->sc->certs_x509[0] == NULL) {
113                cprio[0] = GNUTLS_CRT_OPENPGP;
114                cprio[1] = 0;
115-               gnutls_certificate_type_set_priority(session, cprio);
116+               gnutls_set_default_priority(session);
117        }
118 
119        return 0;
120@@ -750,7 +750,7 @@
121                return DECLINED;
122        }
123 
124-       if (c->remote_addr->hostname || apr_strnatcmp(c->remote_ip,c->local_ip) == 0) {
125+       if (c->remote_host || apr_strnatcmp(c->client_ip,c->local_ip) == 0) {
126         /* Connection initiated by Apache (mod_proxy) => ignore */
127                 return OK;
128         }
Note: See TracBrowser for help on using the repository browser.