Skip to content

Commit

Permalink
fix Cloudflare HPACK patch to Nginx 1.15.2 max version
Browse files Browse the repository at this point in the history
Nginx 1.15.3 has breaking changes that are incompatible with existing Cloudflare HPACK patch so needs an updated patch at which time will update to support Nginx 1.15.3+ https://community.centminmod.com/threads/openssl-1-1-1-tls-1-3-nearly-here.15409/#post-65975
  • Loading branch information
centminmod committed Aug 16, 2018
1 parent e5b0997 commit 2c7bc82
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
15 changes: 11 additions & 4 deletions inc/nginx_configure.inc
Expand Up @@ -230,9 +230,16 @@ if [[ "$CENTOS_SEVEN" = '7' || "$CENTOS_SIX" = '6' ]]; then
echo "$DETECT_NGXVER"
fi

if [[ "$TLSONETHREE_DETECT" = [yY] ]]; then
NGINX_HPACK='n'
fi
# if openssl 1.1.1 breaks HPACK patching
# if [[ "$TLSONETHREE_DETECT" = [yY] ]]; then
# NGINX_HPACK='n'
# NGX_HPACK_OPT=""
# fi
# DETECTOPENSSL_ONEZERO=$(echo $OPENSSL_VERSION | cut -d . -f1-2)
# if [[ "$DETECTOPENSSL_ONEZERO" = '1.0' ]]; then
# NGINX_HPACK='n'
# NGX_HPACK_OPT=""
# fi

# if [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -ge '1013006' && "$DETECT_NGXVER" -lt '1013009' ]]; then
if [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -ge '1013006' && "$DETECT_NGXVER" -lt '1013010' ]]; then
Expand All @@ -241,7 +248,7 @@ if [[ "$CENTOS_SEVEN" = '7' || "$CENTOS_SIX" = '6' ]]; then
NGX_HPACK_OPT=' --with-http_v2_hpack_enc'
elif [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -eq '1014000' ]]; then
NGX_HPACK_OPT=' --with-http_v2_hpack_enc'
elif [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -ge '1015000' && "$DETECT_NGXVER" -le '1015003' ]]; then
elif [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -ge '1015000' && "$DETECT_NGXVER" -le '1015002' ]]; then
NGX_HPACK_OPT=' --with-http_v2_hpack_enc'
else
NGX_HPACK_OPT=""
Expand Down
8 changes: 4 additions & 4 deletions inc/nginx_patch.inc
@@ -1,7 +1,7 @@
ngx_hpack_patch() {
if [[ "$TLSONETHREE_DETECT" = [yY] ]]; then
NGINX_HPACK='n'
fi
# if [[ "$TLSONETHREE_DETECT" = [yY] ]]; then
# NGINX_HPACK='n'
# fi
if [[ "$ngver" && "$ngver" = 'master-google' ]]; then
DETECT_NGXVER=$(awk '/define nginx_version / {print $3}' "/svr-setup/nginx-$ngver/src/core/nginx.h")
NGINX_PUSHBASE=$ngver
Expand Down Expand Up @@ -57,7 +57,7 @@ ngx_hpack_patch() {
NGX_HPACK_OPT=' --with-http_v2_hpack_enc'
# NGX_HPACK_OPT=""
# NGINX_HPACK='n'
elif [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -ge '1015000' ]] || [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -eq '1015000' ]]; then
elif [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -ge '1015000' ]] && [[ "$NGINX_HPACK" = [yY] && "$DETECT_NGXVER" -le '1015002' ]]; then
pushd "${DIR_TMP}/nginx-${NGINX_PUSHBASE}"
cecho "patching nginx http/2 full HPACK encoding support" $boldyellow
cecho "nginx-1.15.0_http2-hpack.patch" $boldyellow
Expand Down

0 comments on commit 2c7bc82

Please sign in to comment.