mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 11:42:18 +08:00
Update webget.sh
This commit is contained in:
parent
999e42c9b1
commit
6015bc4425
|
@ -1943,10 +1943,13 @@ getcrt(){ #下载根证书文件
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
setcrt(){
|
setcrt(){
|
||||||
openssldir=$(openssl version -a 2>&1 | grep OPENSSLDIR | awk -F "\"" '{print $2}')
|
openssldir="$(openssl version -d 2>&1 | awk -F '"' '{print $2}')"
|
||||||
[ -z "$openssldir" ] && openssldir=/etc/ssl
|
if [ -d "$openssldir/certs/" ];then
|
||||||
|
crtdir="$openssldir/certs/ca-certificates.crt"
|
||||||
|
else
|
||||||
|
crtdir="/etc/ssl/certs/ca-certificates.crt"
|
||||||
|
fi
|
||||||
if [ -n "$openssldir" ];then
|
if [ -n "$openssldir" ];then
|
||||||
crtdir="$openssldir/certs/ca-certificates.crt"
|
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[36m安装/更新本地根证书文件(ca-certificates.crt)\033[0m"
|
echo -e "\033[36m安装/更新本地根证书文件(ca-certificates.crt)\033[0m"
|
||||||
echo -e "\033[33m用于解决证书校验错误,x509报错等问题\033[0m"
|
echo -e "\033[33m用于解决证书校验错误,x509报错等问题\033[0m"
|
||||||
|
@ -2273,8 +2276,8 @@ userguide(){
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
#检测及下载根证书
|
#检测及下载根证书
|
||||||
openssldir=$(openssl version -a 2>&1 | grep OPENSSLDIR | awk -F "\"" '{print $2}')
|
openssldir="$(openssl version -d 2>&1 | awk -F '"' '{print $2}')"
|
||||||
[ -z "$openssldir" ] && openssldir=/etc/ssl
|
[ ! -d "$openssldir/certs" ] && openssldir=/etc/ssl
|
||||||
if [ -d $openssldir/certs -a ! -f $openssldir/certs/ca-certificates.crt ];then
|
if [ -d $openssldir/certs -a ! -f $openssldir/certs/ca-certificates.crt ];then
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[33m当前设备未找到根证书文件\033[0m"
|
echo -e "\033[33m当前设备未找到根证书文件\033[0m"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user