aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2016-10-19 18:36:50 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2016-10-19 18:36:50 +0300
commit9b8b33bd4a3f44a4d1a23b7fba09a014e0fcc5ab (patch)
treebfe8162d3d610553b6506d6eb6786b904e571fab /src/http/ngx_http_upstream.c
parent33f940534e89c599998ed9e516af565e6372e700 (diff)
downloadnginx-9b8b33bd4a3f44a4d1a23b7fba09a014e0fcc5ab.tar.gz
nginx-9b8b33bd4a3f44a4d1a23b7fba09a014e0fcc5ab.zip
SSL: compatibility with BoringSSL.
BoringSSL changed SSL_set_tlsext_host_name() to be a real function with a (const char *) argument, so it now triggers a warning due to conversion from (u_char *). Added an explicit cast to silence the warning. Prodded by Piotr Sikora, Alessandro Ghedini.
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 4d5bea35e..55a62ef8b 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1696,7 +1696,10 @@ ngx_http_upstream_ssl_name(ngx_http_request_t *r, ngx_http_upstream_t *u,
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"upstream SSL server name: \"%s\"", name.data);
- if (SSL_set_tlsext_host_name(c->ssl->connection, name.data) == 0) {
+ if (SSL_set_tlsext_host_name(c->ssl->connection,
+ (char *) name.data)
+ == 0)
+ {
ngx_ssl_error(NGX_LOG_ERR, r->connection->log, 0,
"SSL_set_tlsext_host_name(\"%s\") failed", name.data);
return NGX_ERROR;