OpenSSL 错误消息:错误:1416F086:SSL 例程:tls_process_server_certificate:证书验证失败 [英] OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

查看:496
本文介绍了OpenSSL 错误消息:错误:1416F086:SSL 例程:tls_process_server_certificate:证书验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 10 计算机和 Composer 版本 1.9.0 上使用 PHP v7.2

I am using PHP v7.2, on Windows 10 Computer and Composer version 1.9.0

composer create-project --prefer-dist laravel/laravel 博客

我正在尝试安装 Laravel 并使用 Composer 启动一个项目,但出现以下错误

I am trying to install Laravel and start a project using composer but getting the following error

OpenSSL 错误消息:错误:1416F086:SSL 例程:tls_process_server_certificate:证书验证失败

OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

当我运行 composer 诊断 得到低于结果

When I run composer diagnose getting below result

PS C:\xampp\htdocs\webstore_services> 作曲家诊断检查平台设置:确定检查 git 设置:好的检查与 packagist 的 http 连接:警告:通过 http 访问 192.168.1xx.2xx,这是一种不安全的协议.好的检查与 packagist 的 https 连接:[Composer\Downloader\TransportException] "https://repo.packagist.org/无法下载packages.json"文件:SSL 操作失败,代码为1.OpenSSL 错误消息:错误:1416F086:SSL 例程:tls_process_server_certificate:证书验证失败无法启用加密无法打开流:操作失败检查 github.com 速率限制:失败[Composer\Downloader\TransportException] https://api.github.com/rate_limit" 文件可以无法下载:SSL 操作失败,代码为 1.OpenSSL 错误消息:错误:1416F086:SSL 例程:tls_process_server_certificate:证书验证失败无法启用加密无法打开流:操作失败检查磁盘可用空间:确定检查公钥:标签公钥指纹:57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642开发公钥指纹:4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952好的检查作曲家版本:[作曲家\下载器\传输异常]
无法下载https://getcomposer.org/versions"文件:SSL 操作失败,代码为 1.OpenSSL 错误消息:
错误:1416F086:SSL 例程:tls_process_server_certificate:证书验证失败
无法启用加密
无法打开流:操作失败
诊断

PS C:\xampp\htdocs\webstore_services> composer diagnose Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: Warning: Accessing 192.168.1xx.2xx over http which is an insecure protocol. OK Checking https connectivity to packagist: [Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed Checking github.com rate limit: FAIL [Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed Failed to enable crypto failed to open stream: operation failed Checking disk free space: OK Checking pubkeys: Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642 Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952 OK Checking composer version: [Composer\Downloader\TransportException]
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
diagnose

网上几乎所有的解决方案我都试过了

I have tried almost every solution on the Internet

php -r "print_r(openssl_get_cert_locations());"

结果

(
    [default_cert_file] => C:\usr\local\ssl/cert.pem
    [default_cert_file_env] => SSL_CERT_FILE
    [default_cert_dir] => C:\usr\local\ssl/certs
    [default_cert_dir_env] => SSL_CERT_DIR
    [default_private_dir] => C:\usr\local\ssl/private
    [default_default_cert_area] => C:\usr\local\ssl
    [ini_cafile] => C:\xampp\php\cacert.pem
    [ini_capath] => C:\xampp\php\cacert.pem
)

如何更改default_cert_file的位置,只剩下这个了?

How will I change the location of default_cert_file in this, Only this is left?

自从我使用 Corporate Proxy 以来,我已经设置了代理的 env 变量.

Since I am on Corporate Proxy I have set the env-variable of the proxy.

https_proxy : http://user:pass@host:porthttp_proxy : http://user:pass@host:port

https_proxy : http://user:pass@host:port http_proxy : http://user:pass@host:port

在我所做的一切之后,它并没有帮助我.

After everything I do, it doesn't help me though.

推荐答案

我不知道我是否会回答你,但我会尽力启发你:

I do not know if I will answer you, but I will try to enlighten you:

这是一个安全连接失败:default_cert_file 在生成证书时定义

it is a secure connection failure: default_cert_file is defined when you generate the certificate

error:1416F086:SSL 是一个类似的错误服务器拒绝您的证书,因为它已被吊销、不存在或不正确当安全证书无效或不再有效时,浏览器中可能会出现相同错误,错误代码为:SSL_ERROR_REVOKED_CERT_ALERT 或 SSL_ERROR_HANDSHAKE_FAILURE_ALER

error:1416F086:SSL is an error like the server rejected your certificate because it is revoked, nonexistent or incorrect the same error can occur in a browser with Error code: SSL_ERROR_REVOKED_CERT_ALERT or SSL_ERROR_HANDSHAKE_FAILURE_ALER when the security certificate is not or no longer valid

当您生成根证书时,这可能取决于配置文件,其中指定了几个信息,尤其是路径:

when you generate a root certificate this can depend on a configuration file in which is specified several information, notably the path:

[CA_default]dir = ./certificats # 保存所有东西的地方

[CA_default] dir = ./certificats # Where everything is kept

openssl 等...

openssl etc ...

我认为你正在寻找的是相似的

I think what you're looking for is akin

SSL 上下文选项SSL 上下文选项 — SSL 上下文选项列表

cafile 字符串

Location of Certificate Authority file on local filesystem which should be used with the verify_peer context option to authenticate the identity of the remote peer.

capath 字符串

If cafile is not specified or if the certificate is not found there, the directory pointed to by capath is searched for a suitable certificate. capath must be a correctly hashed certificate directory.

这篇关于OpenSSL 错误消息:错误:1416F086:SSL 例程:tls_process_server_certificate:证书验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆