From 1f43a12f818a6c6a075ff76e0a1bd35da4a50361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 1 Dec 2023 22:22:18 +0800 Subject: [PATCH] fix: patch OpenSSL for OpenResty --- scripts/openresty/install.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/openresty/install.sh b/scripts/openresty/install.sh index e9ab519c..b6cf3d3d 100644 --- a/scripts/openresty/install.sh +++ b/scripts/openresty/install.sh @@ -82,6 +82,23 @@ rm -f openssl-1.1.1w.tar.gz rm -f openssl-1.1.1w.tar.gz.checksum.txt mv openssl-1.1.1w openssl +# patch openssl +cd openssl +wget -T 20 -t 3 -O openssl-1.1.1f-sess_set_get_cb_yield.patch ${downloadUrl}/openssl/openssl-1.1.1f-sess_set_get_cb_yield.patch +wget -T 20 -t 3 -O openssl-1.1.1f-sess_set_get_cb_yield.patch.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1f-sess_set_get_cb_yield.patch.checksum.txt + +if ! sha256sum --status -c openssl-1.1.1f-sess_set_get_cb_yield.patch.checksum.txt; then + echo -e $HR + echo "错误:OpenSSL 补丁文件 checksum 校验失败,文件可能被篡改或不完整,已终止操作" + rm -rf ${openrestyPath} + exit 1 +fi + +patch -p1 < openssl-1.1.1f-sess_set_get_cb_yield.patch +rm -f openssl-1.1.1f-sess_set_get_cb_yield.patch +rm -f openssl-1.1.1f-sess_set_get_cb_yield.patch.checksum.txt +cd ../ + # pcre wget -T 60 -t 3 -O pcre-8.45.tar.gz ${downloadUrl}/pcre/pcre-8.45.tar.gz wget -T 20 -t 3 -O pcre-8.45.tar.gz.checksum.txt ${downloadUrl}/pcre/pcre-8.45.tar.gz.checksum.txt