mirror of
https://github.com/nginx/nginx.git
synced 2024-11-29 01:09:53 +08:00
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.
This commit is contained in:
parent
33f940534e
commit
9b8b33bd4a
@ -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;
|
||||
|
@ -1183,7 +1183,8 @@ ngx_stream_proxy_ssl_name(ngx_stream_session_t *s)
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
|
||||
"upstream SSL server name: \"%s\"", name.data);
|
||||
|
||||
if (SSL_set_tlsext_host_name(u->peer.connection->ssl->connection, name.data)
|
||||
if (SSL_set_tlsext_host_name(u->peer.connection->ssl->connection,
|
||||
(char *) name.data)
|
||||
== 0)
|
||||
{
|
||||
ngx_ssl_error(NGX_LOG_ERR, s->connection->log, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user