linux wget 证书未激活,无法获取cURL或wget来验证某些SSL证书

在Windows7上,所有浏览器都能正常打开https://www.bgetem.de/,但在CentOS6和Ubuntu16.04上,cURL和wget在验证SSL证书时遇到问题。错误信息表明证书颁发机构不被系统认可。这可能与不同操作系统中使用的SSL库和证书信任链有关。
摘要由CSDN通过智能技术生成

我注意到我们使用cURL的链接检查程序越来越频繁地验证SSL证书.我试图深究这一点.

例如,https://www.bgetem.de/在我的Windows 7机器上的每个浏览器(IE 11,Firefox,Opera,Chrome)上打开都很好,但是我的CentOS 6和Ubuntu 16.04上的cURL(和wget)无法验证证书.

这是cURL来自CentOS的详细输出(版本卷号7.19.7(x86_64-redhat-linux-gnu)libcurl / 7.19.7 NSS / 3.27.1 zlib / 1.2.3 libidn / 1.18 libssh2 / 1.4.2)

* About to connect() to www.bgetem.de port 443 (#0)

* Trying 193.104.3.166... connected

* Connected to www.bgetem.de (193.104.3.166) port 443 (#0)

* Initializing NSS with certpath: sql:/etc/pki/nssdb

* CAfile: /etc/pki/tls/certs/ca-bundle.crt

CApath: none

* Peer's certificate issuer is not recognized: 'CN=COMODO RSA Domain Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB'

* NSS error -8179

* Closing connection #0

* Peer certificate cannot be authenticated with known CA certificates

和Ubuntu(版本卷7.47.0(x86_64-pc-linux-gnu)libcurl / 7.47.0 GnuTLS / 3.4.10 zlib / 1.2.8 libidn / 1.32 librtmp / 2.3):

* found 173 certificates in /etc/ssl/certs/ca-certificates.crt

* found 695 certificates in /etc/ssl/certs

* ALPN, offering http/1.1

* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384

* server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

* Closing connection 0

curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

知道问题是什么以及如何解决它?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,以下是编译安装 PHP 7.4 的步骤: 1. 安装依赖项 ```bash sudo apt-get update sudo apt-get install -y build-essential libxml2-dev libssl-dev libbz2-dev libjpeg-dev libpng-dev libwebp-dev libxpm-dev libfreetype6-dev libgmp-dev libldap2-dev libmcrypt-dev libtidy-dev libxslt-dev ``` 2. 下载 PHP 7.4 ```bash wget https://www.php.net/distributions/php-7.4.24.tar.gz ``` 3. 解压缩文件 ```bash tar -zxvf php-7.4.24.tar.gz cd php-7.4.24 ``` 4. 配置编译选项 ```bash ./configure --prefix=/usr/local/php-7.4 \ --with-config-file-path=/usr/local/php-7.4/etc \ --enable-fpm \ --with-fpm-user=www \ --with-fpm-group=www \ --with-mysqli \ --with-pdo-mysql \ --with-iconv-dir \ --with-freetype \ --with-jpeg \ --with-png \ --with-webp \ --with-xpm \ --with-zlib \ --with-libxml-dir \ --with-gd \ --with-openssl \ --with-mhash \ --with-xmlrpc \ --with-curl \ --with-imap-ssl \ --with-ldap \ --with-ldap-sasl \ --with-mcrypt \ --with-readline \ --with-tidy \ --with-xmlrpc \ --with-xsl \ --enable-bcmath \ --enable-calendar \ --enable-exif \ --enable-ftp \ --enable-gd-jis-conv \ --enable-gd-native-ttf \ --enable-inline-optimization \ --enable-intl \ --enable-mbstring \ --enable-opcache \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --enable-wddx \ --enable-zip \ --enable-mysqlnd \ --enable-shared \ --enable-static \ --disable-debug ``` 5. 编译安装 ```bash make sudo make install ``` 6. 配置 PHP ```bash sudo cp php.ini-production /usr/local/php-7.4/etc/php.ini sudo cp /usr/local/php-7.4/etc/php-fpm.conf.default /usr/local/php-7.4/etc/php-fpm.conf sudo cp sapi/fpm/php-fpm.service /etc/systemd/system/ sudo systemctl enable php-fpm.service sudo systemctl start php-fpm.service ``` 现在,PHP 7.4 应该已经成功安装并运行在你的 Linux 系统上了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值