~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to debian/patches/034_ab2_has_openssl

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- build-tree/apache2/support/ab.c     28 Aug 2004 16:20:08 -0000      1.121.2.12
2
 
+++ build-tree/apache2/support/ab.c     28 Sep 2004 16:02:31 -0000
3
 
@@ -142,9 +142,17 @@
4
 
 #endif
5
 
 #if APR_HAVE_STDLIB_H
6
 
 #include <stdlib.h>
7
 
+#endif
8
 
+#if APR_HAVE_UNISTD_H
9
 
+#include <unistd.h>
10
 
+#endif
11
 
+
12
 
+#if !defined(WIN32) && !defined(NETWARE)
13
 
+#include "ap_config_auto.h"
14
 
+#endif
15
 
 
16
 
-#ifdef USE_SSL
17
 
-#if ((!(RSAREF)) && (!(SYSSSL)))
18
 
+#define HAVE_OPENSSL
19
 
+#if defined(HAVE_OPENSSL)
20
 
 /* Libraries on most systems.. */
21
 
 #include <openssl/rsa.h>
22
 
 #include <openssl/crypto.h>
23
 
@@ -153,20 +161,11 @@
24
 
 #include <openssl/err.h>
25
 
 #include <openssl/ssl.h>
26
 
 #include <openssl/rand.h>
27
 
-#else
28
 
-/* Libraries for RSAref and SYSSSL */
29
 
-#include <rsa.h>
30
 
-#include <crypto.h>
31
 
-#include <x509.h>
32
 
-#include <pem.h>
33
 
-#include <err.h>
34
 
-#include <ssl.h>
35
 
-#include <rand.h>
36
 
-#endif
37
 
+#define USE_SSL
38
 
+
39
 
 #endif
40
 
 
41
 
 #include <math.h>
42
 
-#endif
43
 
 #if APR_HAVE_CTYPE_H
44
 
 #include <ctype.h>
45
 
 #endif
46
 
@@ -424,7 +423,7 @@
47
 
  *
48
 
  */
49
 
 #ifdef USE_SSL
50
 
-long ssl_print_cb(BIO *bio,int cmd,const char *argp,int argi,long argl,long ret)
51
 
+static long ssl_print_cb(BIO *bio,int cmd,const char *argp,int argi,long argl,long ret)
52
 
 {
53
 
     BIO *out;
54
 
 
55
 
@@ -466,7 +465,7 @@
56
 
     return i;
57
 
 }
58
 
 
59
 
-void ssl_rand_seed()
60
 
+static void ssl_rand_seed()
61
 
 {
62
 
     int nDone = 0;
63
 
     int n, l;
64
 
@@ -498,9 +497,7 @@
65
 
     nDone += 128;
66
 
 }
67
 
 
68
 
-int ssl_print_connection_info(bio,ssl)
69
 
-BIO *bio;
70
 
-SSL *ssl;
71
 
+static int ssl_print_connection_info(BIO *bio, SSL *ssl)
72
 
 {
73
 
         SSL_CIPHER *c;
74
 
         int alg_bits,bits;
75
 
@@ -515,9 +512,7 @@
76
 
         return(1);
77
 
 }
78
 
 
79
 
-int ssl_print_cert_info(bio,x509cert)
80
 
-BIO *bio;
81
 
-X509 *x509cert;
82
 
+static int ssl_print_cert_info(BIO *bio, X509 *x509cert)
83
 
 {
84
 
         X509_NAME *dn;
85
 
         char buf[64];
86
 
@@ -549,7 +544,7 @@
87
 
         return(1);
88
 
 }
89
 
 
90
 
-void ssl_start_connect(struct connection * c)
91
 
+static void ssl_start_connect(struct connection * c)
92
 
 {
93
 
     BIO *bio;
94
 
     X509 *x509cert;
95
 
@@ -685,7 +680,7 @@
96
 
     do {
97
 
        apr_time_t tnow = apr_time_now();
98
 
        apr_size_t l = c->rwrite;
99
 
-       apr_status_t e;
100
 
+       apr_status_t e = APR_SUCCESS; /* prevent GCC warning */
101
 
 
102
 
        /*
103
 
         * First time round ?
104
 
@@ -1670,7 +1665,14 @@
105
 
 
106
 
        for (i = 0; i < n; i++) {
107
 
             const apr_pollfd_t *next_fd = &(pollresults[i]);
108
 
-            struct connection *c = next_fd->client_data;
109
 
+            struct connection *c;
110
 
+
111
 
+#ifdef USE_SSL
112
 
+            if (ssl)
113
 
+                c = &con[i];
114
 
+            else
115
 
+#endif
116
 
+                c = next_fd->client_data;
117
 
 
118
 
            /*
119
 
             * If the connection isn't connected how can we check it?
120
 
@@ -1772,14 +1774,14 @@
121
 
 static void copyright(void)
122
 
 {
123
 
     if (!use_html) {
124
 
-       printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.121.2.12 $> apache-2.0");
125
 
+       printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.141 $> apache-2.0");
126
 
        printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
127
 
        printf("Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/\n");
128
 
        printf("\n");
129
 
     }
130
 
     else {
131
 
        printf("<p>\n");
132
 
-       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_AB_BASEREVISION, "$Revision: 1.121.2.12 $");
133
 
+       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_AB_BASEREVISION, "$Revision: 1.141 $");
134
 
        printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
135
 
        printf(" Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/<br>\n");
136
 
        printf("</p>\n<p>\n");