From efa8059dec97b1abdee80307a9b5405704df7630 Mon Sep 17 00:00:00 2001 From: Hakase Date: Sun, 7 Oct 2018 19:58:10 +0900 Subject: [PATCH] Fix some missing sources. Issue: https://github.com/hakasenyang/openssl-patch/issues/7#issuecomment-427643975 --- nginx_strict-sni.patch | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/nginx_strict-sni.patch b/nginx_strict-sni.patch index 8bc4e1b..86f8310 100644 --- a/nginx_strict-sni.patch +++ b/nginx_strict-sni.patch @@ -28,3 +28,35 @@ index 75129134..d0b926fe 100644 /* handshake failures */ if (n == SSL_R_BAD_CHANGE_CIPHER_SPEC /* 103 */ +diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c +index 7dd28b8c..5e5bbed1 100644 +--- a/src/http/ngx_http_request.c ++++ b/src/http/ngx_http_request.c +@@ -849,7 +849,7 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg) + servername = SSL_get_servername(ssl_conn, TLSEXT_NAMETYPE_host_name); + + if (servername == NULL) { +- return SSL_TLSEXT_ERR_NOACK; ++ return SSL_TLSEXT_ERR_ALERT_FATAL; + } + + c = ngx_ssl_get_connection(ssl_conn); +@@ -864,7 +864,7 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg) + host.len = ngx_strlen(servername); + + if (host.len == 0) { +- return SSL_TLSEXT_ERR_NOACK; ++ return SSL_TLSEXT_ERR_ALERT_FATAL; + } + + host.data = (u_char *) servername; +@@ -879,7 +879,7 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg) + NULL, &cscf) + != NGX_OK) + { +- return SSL_TLSEXT_ERR_NOACK; ++ return SSL_TLSEXT_ERR_ALERT_FATAL; + } + + hc->ssl_servername = ngx_palloc(c->pool, sizeof(ngx_str_t)); +