【Linux】使用wget下载https类型文件时出现Unable to establish SSL connection

深度链接 / 2023-12-06 21:48:31 / 250

使用wget下载https类型文件时出现Unable to establish SSL connection,意思是无法建立SSL连接。

1、问题描述

root@wrx ~]# wget https://www.researchgate.net/profile/Jeffery_Mcmullen2/publication/5223284_Venture_Capitalists%27_Decision_Policies_Across_Three_Countries_An_Institutional_Theory_Perspective/links/55bfc16108ae9289a09b61sfs3c/Venture-Capitalists-Decision-Policies-Across-Three-Countries-An-Institutional-Theory-Perspective.pdf
--2017-09-22 16:17:44--  https://www.researchgate.net/profile/Jeffery_Mcmullen2/publication/5223284_Venture_Capitalists%27_Decision_Policies_Across_Three_Countries_An_Institutional_Theory_Perspective/links/55bfc16108ae9dd289a09b613c/Venture-Capitalists-Decision-Policies-Across-Three-Countries-An-Institutional-Theory-Perspective.pdf
Resolving www.researchgate.net... 52.221.4.63, 54.254.197.244
Connecting to www.researchgate.net|52.221.4.63|:443... connected.
Unable to establish SSL connection.

2、解决办法

[root@wrx ~]# wget -h
HTTPS (SSL/TLS) options:
       --secure-protocol=PR     choose secure protocol, one of auto, SSLv2,
                                SSLv3, and TLSv1.
       --no-check-certificate   don’t validate the server’s certificate. #不检查证书
       --certificate=FILE       client certificate file.
       --certificate-type=TYPE  client certificate type, PEM or DER.
       --private-key=FILE       private key file.
       --private-key-type=TYPE  private key type, PEM or DER.
       --ca-certificate=FILE    file with the bundle of CA’s.
       --ca-directory=DIR       directory where hash list of CA’s is stored.
       --random-file=FILE       file with random data for seeding the SSL PRNG.
       --egd-file=FILE          file naming the EGD socket with random data.
#加上--no-check-certificate,取消证书检查
 [root@wrx ~]# wget --no-check-certificate https://www.researchgate.net/profile/Jeffery_Mcmullen2/publication/5223284_Venture_Capitalists%27_Decision_Policies_Across_Three_Countries_An_Institutional_Theory_Perspective/links/55bfc16108ae9dd289a09b613c/Venture-Capitalists-Decision-Policies-Across-Three-Countries-An-Institutional-Theory-Perspective.pdf