-
Notifications
You must be signed in to change notification settings - Fork 14
/
nginx-1.13.0-wolfssl-debug.patch
171 lines (142 loc) · 6.77 KB
/
nginx-1.13.0-wolfssl-debug.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
diff -ur nginx-1.13.0-wolfssl/auto/options nginx-1.13.0-wolfssl-debug/auto/options
--- nginx-1.13.0-wolfssl/auto/options 2018-02-01 08:37:32.565863658 +1000
+++ nginx-1.13.0-wolfssl-debug/auto/options 2018-02-01 08:36:08.797416011 +1000
@@ -143,7 +143,6 @@
USE_OPENSSL=NO
OPENSSL=NONE
-WOLFSSL=NONE
USE_ZLIB=NO
ZLIB=NONE
@@ -346,7 +345,6 @@
--with-pcre-opt=*) PCRE_OPT="$value" ;;
--with-pcre-jit) PCRE_JIT=YES ;;
- --with-wolfssl=*) WOLFSSL="$value" ;;
--with-openssl=*) OPENSSL="$value" ;;
--with-openssl-opt=*) OPENSSL_OPT="$value" ;;
@@ -565,7 +563,6 @@
--with-libatomic force libatomic_ops library usage
--with-libatomic=DIR set path to libatomic_ops library sources
- --with-wolfssl=DIR set path to wolfSSL headers and library
--with-openssl=DIR set path to OpenSSL library sources
--with-openssl-opt=OPTIONS set additional build options for OpenSSL
diff -ur nginx-1.13.0-wolfssl/src/event/ngx_event_openssl.c nginx-1.13.0-wolfssl-debug/src/event/ngx_event_openssl.c
--- nginx-1.13.0-wolfssl/src/event/ngx_event_openssl.c 2018-02-02 14:28:42.591166177 +1000
+++ nginx-1.13.0-wolfssl-debug/src/event/ngx_event_openssl.c 2018-02-02 14:29:12.030976039 +1000
@@ -144,6 +144,11 @@
#endif
+#ifdef WOLFSSL_NGINX
+ /* Turn on internal wolfssl debugging to stdout */
+ wolfSSL_Debugging_ON();
+#endif
+
#if OPENSSL_VERSION_NUMBER >= 0x0090800fL
#ifndef SSL_OP_NO_COMPRESSION
{
@@ -346,10 +351,6 @@
SSL_CTX_set_info_callback(ssl->ctx, ngx_ssl_info_callback);
-#ifdef WOLFSSL_NGINX
- SSL_CTX_set_verify(ssl->ctx, SSL_VERIFY_NONE, NULL);
-#endif
-
return NGX_OK;
}
@@ -658,14 +659,6 @@
ngx_int_t
-ngx_ssl_set_verify_on(ngx_conf_t *cf, ngx_ssl_t *ssl)
-{
- SSL_CTX_set_verify(ssl->ctx, SSL_VERIFY_PEER, ngx_ssl_verify_callback);
-
- return NGX_OK;
-}
-
-ngx_int_t
ngx_ssl_client_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert,
ngx_int_t depth)
{
diff -ur nginx-1.13.0-wolfssl/src/event/ngx_event_openssl.h nginx-1.13.0-wolfssl-debug/src/event/ngx_event_openssl.h
--- nginx-1.13.0-wolfssl/src/event/ngx_event_openssl.h 2018-02-01 08:42:38.107428966 +1000
+++ nginx-1.13.0-wolfssl-debug/src/event/ngx_event_openssl.h 2018-02-01 08:40:01.334637114 +1000
@@ -57,7 +57,7 @@
#define ngx_ssl_conn_t SSL
-#if (OPENSSL_VERSION_NUMBER < 0x10002000L) && !defined(WOLFSSL_NGINX)
+#if (OPENSSL_VERSION_NUMBER < 0x10002000L)
#define SSL_is_server(s) (s)->server
#endif
@@ -156,7 +156,6 @@
ngx_str_t *cert, ngx_str_t *key, ngx_array_t *passwords);
ngx_int_t ngx_ssl_ciphers(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *ciphers,
ngx_uint_t prefer_server_ciphers);
-ngx_int_t ngx_ssl_set_verify_on(ngx_conf_t *cf, ngx_ssl_t *ssl);
ngx_int_t ngx_ssl_client_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl,
ngx_str_t *cert, ngx_int_t depth);
ngx_int_t ngx_ssl_trusted_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl,
diff -ur nginx-1.13.0-wolfssl/src/event/ngx_event_openssl_stapling.c nginx-1.13.0-wolfssl-debug/src/event/ngx_event_openssl_stapling.c
--- nginx-1.13.0-wolfssl/src/event/ngx_event_openssl_stapling.c 2018-02-01 08:37:32.569863679 +1000
+++ nginx-1.13.0-wolfssl-debug/src/event/ngx_event_openssl_stapling.c 2018-02-01 08:36:08.805416054 +1000
@@ -313,9 +313,7 @@
for (i = 0; i < n; i++) {
issuer = sk_X509_value(chain, i);
if (X509_check_issued(issuer, cert) == X509_V_OK) {
-#ifdef WOLFSSL_NGINX
- issuer = X509_dup(issuer);
-#elif OPENSSL_VERSION_NUMBER >= 0x10100001L
+#if OPENSSL_VERSION_NUMBER >= 0x10100001L
X509_up_ref(issuer);
#else
CRYPTO_add(&issuer->references, 1, CRYPTO_LOCK_X509);
diff -ur nginx-1.13.0-wolfssl/src/http/modules/ngx_http_proxy_module.c nginx-1.13.0-wolfssl-debug/src/http/modules/ngx_http_proxy_module.c
--- nginx-1.13.0-wolfssl/src/http/modules/ngx_http_proxy_module.c 2018-02-01 08:37:32.569863679 +1000
+++ nginx-1.13.0-wolfssl-debug/src/http/modules/ngx_http_proxy_module.c 2018-02-01 08:36:08.805416054 +1000
@@ -4372,8 +4372,6 @@
return NGX_ERROR;
}
- ngx_ssl_set_verify_on(cf, plcf->upstream.ssl);
-
if (ngx_ssl_trusted_certificate(cf, plcf->upstream.ssl,
&plcf->ssl_trusted_certificate,
plcf->ssl_verify_depth)
diff -ur nginx-1.13.0-wolfssl/src/http/modules/ngx_http_ssl_module.c nginx-1.13.0-wolfssl-debug/src/http/modules/ngx_http_ssl_module.c
--- nginx-1.13.0-wolfssl/src/http/modules/ngx_http_ssl_module.c 2018-02-01 08:37:32.569863679 +1000
+++ nginx-1.13.0-wolfssl-debug/src/http/modules/ngx_http_ssl_module.c 2018-02-01 08:36:08.809416074 +1000
@@ -14,11 +14,7 @@
ngx_pool_t *pool, ngx_str_t *s);
-#ifndef WOLFSSL_NGINX
#define NGX_DEFAULT_CIPHERS "HIGH:!aNULL:!MD5"
-#else
-#define NGX_DEFAULT_CIPHERS "ALL"
-#endif
#define NGX_DEFAULT_ECDH_CURVE "auto"
#define NGX_HTTP_NPN_ADVERTISE "\x08http/1.1"
diff -ur nginx-1.13.0-wolfssl/src/mail/ngx_mail_ssl_module.c nginx-1.13.0-wolfssl-debug/src/mail/ngx_mail_ssl_module.c
--- nginx-1.13.0-wolfssl/src/mail/ngx_mail_ssl_module.c 2018-02-01 08:37:32.569863679 +1000
+++ nginx-1.13.0-wolfssl-debug/src/mail/ngx_mail_ssl_module.c 2018-02-01 08:36:08.813416096 +1000
@@ -10,11 +10,7 @@
#include <ngx_mail.h>
-#ifndef WOLFSSL_NGINX
#define NGX_DEFAULT_CIPHERS "HIGH:!aNULL:!MD5"
-#else
-#define NGX_DEFAULT_CIPHERS "ALL"
-#endif
#define NGX_DEFAULT_ECDH_CURVE "auto"
diff -ur nginx-1.13.0-wolfssl/src/stream/ngx_stream_proxy_module.c nginx-1.13.0-wolfssl-debug/src/stream/ngx_stream_proxy_module.c
--- nginx-1.13.0-wolfssl/src/stream/ngx_stream_proxy_module.c 2018-02-01 08:37:32.569863679 +1000
+++ nginx-1.13.0-wolfssl-debug/src/stream/ngx_stream_proxy_module.c 2018-02-01 08:36:08.813416096 +1000
@@ -2002,8 +2002,6 @@
return NGX_ERROR;
}
- ngx_ssl_set_verify_on(cf, pscf->ssl);
-
if (ngx_ssl_trusted_certificate(cf, pscf->ssl,
&pscf->ssl_trusted_certificate,
pscf->ssl_verify_depth)
diff -ur nginx-1.13.0-wolfssl/src/stream/ngx_stream_ssl_module.c nginx-1.13.0-wolfssl-debug/src/stream/ngx_stream_ssl_module.c
--- nginx-1.13.0-wolfssl/src/stream/ngx_stream_ssl_module.c 2018-02-01 08:37:32.569863679 +1000
+++ nginx-1.13.0-wolfssl-debug/src/stream/ngx_stream_ssl_module.c 2018-02-01 08:36:08.813416096 +1000
@@ -14,11 +14,7 @@
ngx_pool_t *pool, ngx_str_t *s);
-#ifndef WOLFSSL_NGINX
#define NGX_DEFAULT_CIPHERS "HIGH:!aNULL:!MD5"
-#else
-#define NGX_DEFAULT_CIPHERS "ALL"
-#endif
#define NGX_DEFAULT_ECDH_CURVE "auto"