1
1
diff --git src/http/ngx_http_upstream.c src/http/ngx_http_upstream.c
2
- index 76045c4..cee3e2a 100644
2
+ index 04d813a..c812242 100644
3
3
--- src/http/ngx_http_upstream.c
4
4
+++ src/http/ngx_http_upstream.c
5
5
@@ -8,6 +8,9 @@
@@ -10,9 +10,22 @@ index 76045c4..cee3e2a 100644
10
10
+ #include <ngx_http_apisix_module.h>
11
11
+ #endif
12
12
13
- #if (T_NGX_MULTI_UPSTREAM)
14
- #include <ngx_http_multi_upstream_module.h>
15
- @@ -1766,6 +1769,10 @@ ngx_http_upstream_ssl_init_connection(ngx_http_request_t *r,
13
+
14
+ #if (NGX_HTTP_CACHE)
15
+ @@ -1697,8 +1700,11 @@ ngx_http_upstream_ssl_init_connection(ngx_http_request_t *r,
16
+ NGX_HTTP_INTERNAL_SERVER_ERROR);
17
+ return;
18
+ }
19
+ -
20
+ + #if (NGX_HTTP_APISIX)
21
+ + if (u->conf->ssl_server_name || ngx_http_apisix_get_upstream_ssl_verify(r, u->conf->ssl_verify)) {
22
+ + #else
23
+ if (u->conf->ssl_server_name || u->conf->ssl_verify) {
24
+ + #endif
25
+ if (ngx_http_upstream_ssl_name(r, u, c) != NGX_OK) {
26
+ ngx_http_upstream_finalize_request(r, u,
27
+ NGX_HTTP_INTERNAL_SERVER_ERROR);
28
+ @@ -1738,6 +1744,10 @@ ngx_http_upstream_ssl_init_connection(ngx_http_request_t *r,
16
29
17
30
r->connection->log->action = "SSL handshaking to upstream";
18
31
@@ -23,3 +36,15 @@ index 76045c4..cee3e2a 100644
23
36
rc = ngx_ssl_handshake(c);
24
37
25
38
if (rc == NGX_AGAIN) {
39
+ @@ -1785,7 +1795,11 @@ ngx_http_upstream_ssl_handshake(ngx_http_request_t *r, ngx_http_upstream_t *u,
40
+
41
+ if (c->ssl->handshaked) {
42
+
43
+ + #if (NGX_HTTP_APISIX)
44
+ + if (ngx_http_apisix_get_upstream_ssl_verify(r, u->conf->ssl_verify)) {
45
+ + #else
46
+ if (u->conf->ssl_verify) {
47
+ + #endif
48
+ rc = SSL_get_verify_result(c->ssl->connection);
49
+
50
+ if (rc != X509_V_OK) {
0 commit comments