Skip to content

Commit

Permalink
feat: 更新 OpenSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Dec 1, 2023
1 parent 790e560 commit 930b86a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
14 changes: 7 additions & 7 deletions scripts/mysql/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ rm -f mysql-boost-${mysqlVersion}.tar.gz.checksum.txt
mv mysql-${mysqlVersion} src

# openssl
wget -T 120 -t 3 -O ${mysqlPath}/openssl-1.1.1u.tar.gz ${downloadUrl}/openssl/openssl-1.1.1u.tar.gz
wget -T 20 -t 3 -O ${mysqlPath}/openssl-1.1.1u.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1u.tar.gz.checksum.txt
wget -T 120 -t 3 -O ${mysqlPath}/openssl-1.1.1w.tar.gz ${downloadUrl}/openssl/openssl-1.1.1w.tar.gz
wget -T 20 -t 3 -O ${mysqlPath}/openssl-1.1.1w.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1w.tar.gz.checksum.txt

# 校验
if ! sha256sum --status -c openssl-1.1.1u.tar.gz.checksum.txt; then
if ! sha256sum --status -c openssl-1.1.1w.tar.gz.checksum.txt; then
echo -e $HR
echo "错误:OpenSSL 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
rm -rf ${mysqlPath}
exit 1
fi

tar -zxvf openssl-1.1.1u.tar.gz
rm -f openssl-1.1.1u.tar.gz
rm -f openssl-1.1.1u.tar.gz.checksum.txt
mv openssl-1.1.1u openssl
tar -zxvf openssl-1.1.1w.tar.gz
rm -f openssl-1.1.1w.tar.gz
rm -f openssl-1.1.1w.tar.gz.checksum.txt
mv openssl-1.1.1w openssl
cd openssl
./config --prefix=/usr/local/openssl-1.1 --openssldir=/usr/local/openssl-1.1 no-tests
make -j$(nproc)
Expand Down
14 changes: 7 additions & 7 deletions scripts/mysql/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ rm -f mysql-boost-${mysqlVersion}.tar.gz.checksum.txt
mv mysql-${mysqlVersion} src

# openssl
wget -T 120 -t 3 -O ${mysqlPath}/openssl-1.1.1u.tar.gz ${downloadUrl}/openssl/openssl-1.1.1u.tar.gz
wget -T 20 -t 3 -O ${mysqlPath}/openssl-1.1.1u.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1u.tar.gz.checksum.txt
wget -T 120 -t 3 -O ${mysqlPath}/openssl-1.1.1w.tar.gz ${downloadUrl}/openssl/openssl-1.1.1w.tar.gz
wget -T 20 -t 3 -O ${mysqlPath}/openssl-1.1.1w.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1w.tar.gz.checksum.txt

if ! sha256sum --status -c openssl-1.1.1u.tar.gz.checksum.txt; then
if ! sha256sum --status -c openssl-1.1.1w.tar.gz.checksum.txt; then
echo -e $HR
echo "错误:OpenSSL 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
exit 1
fi

tar -zxvf openssl-1.1.1u.tar.gz
rm -f openssl-1.1.1u.tar.gz
rm -f openssl-1.1.1u.tar.gz.checksum.txt
mv openssl-1.1.1u openssl
tar -zxvf openssl-1.1.1w.tar.gz
rm -f openssl-1.1.1w.tar.gz
rm -f openssl-1.1.1w.tar.gz.checksum.txt
mv openssl-1.1.1w openssl
cd openssl
./config --prefix=/usr/local/openssl-1.1 --openssldir=/usr/local/openssl-1.1 no-tests
make "-j${j}"
Expand Down
14 changes: 7 additions & 7 deletions scripts/openresty/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@ mv openresty-${openrestyVersion} src
cd src

# openssl
wget -T 120 -t 3 -O openssl-1.1.1u.tar.gz ${downloadUrl}/openssl/openssl-1.1.1u.tar.gz
wget -T 20 -t 3 -O openssl-1.1.1u.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1u.tar.gz.checksum.txt
wget -T 120 -t 3 -O openssl-1.1.1w.tar.gz ${downloadUrl}/openssl/openssl-1.1.1w.tar.gz
wget -T 20 -t 3 -O openssl-1.1.1w.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1w.tar.gz.checksum.txt

if ! sha256sum --status -c openssl-1.1.1u.tar.gz.checksum.txt; then
if ! sha256sum --status -c openssl-1.1.1w.tar.gz.checksum.txt; then
echo -e $HR
echo "错误:OpenSSL 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
rm -rf ${openrestyPath}
exit 1
fi

tar -zxvf openssl-1.1.1u.tar.gz
rm -f openssl-1.1.1u.tar.gz
rm -f openssl-1.1.1u.tar.gz.checksum.txt
mv openssl-1.1.1u openssl
tar -zxvf openssl-1.1.1w.tar.gz
rm -f openssl-1.1.1w.tar.gz
rm -f openssl-1.1.1w.tar.gz.checksum.txt
mv openssl-1.1.1w openssl

# pcre
wget -T 60 -t 3 -O pcre-8.45.tar.gz ${downloadUrl}/pcre/pcre-8.45.tar.gz
Expand Down
14 changes: 7 additions & 7 deletions scripts/php/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,20 @@ rm -f php-${phpVersionCode}.tar.gz.checksum.txt
mv php-* src

if [ "${phpVersion}" -le "80" ]; then
wget -T 120 -t 3 -O ${phpPath}/openssl-1.1.1u.tar.gz ${downloadUrl}/openssl/openssl-1.1.1u.tar.gz
wget -T 20 -t 3 -O ${phpPath}/openssl-1.1.1u.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1u.tar.gz.checksum.txt
wget -T 120 -t 3 -O ${phpPath}/openssl-1.1.1w.tar.gz ${downloadUrl}/openssl/openssl-1.1.1w.tar.gz
wget -T 20 -t 3 -O ${phpPath}/openssl-1.1.1w.tar.gz.checksum.txt ${downloadUrl}/openssl/openssl-1.1.1w.tar.gz.checksum.txt

if ! sha256sum --status -c openssl-1.1.1u.tar.gz.checksum.txt; then
if ! sha256sum --status -c openssl-1.1.1w.tar.gz.checksum.txt; then
echo -e $HR
echo "错误:PHP-${phpVersion} OpenSSL 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
rm -rf ${phpPath}
exit 1
fi

tar -zxvf openssl-1.1.1u.tar.gz
rm -f openssl-1.1.1u.tar.gz
rm -f openssl-1.1.1u.tar.gz.checksum.txt
mv openssl-1.1.1u openssl
tar -zxvf openssl-1.1.1w.tar.gz
rm -f openssl-1.1.1w.tar.gz
rm -f openssl-1.1.1w.tar.gz.checksum.txt
mv openssl-1.1.1w openssl
cd openssl
./config --prefix=/usr/local/openssl-1.1 --openssldir=/usr/local/openssl-1.1 no-tests
make "-j${j}"
Expand Down

0 comments on commit 930b86a

Please sign in to comment.