能否AWS SDK的不OSX上禁用SSL验证PHP的工作? [英] Can AWS SDK for PHP work without disabling SSL verification on osx?

查看:268
本文介绍了能否AWS SDK的不OSX上禁用SSL验证PHP的工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:尝试通过AWS与S3通信SDK的PHP,你会得到这样的:卷曲的错误:SSL等证书或SSH远程密钥是不正常(卷曲错误code 51)

The problem: Try to communicate with s3 via aws sdk for php and you get this: "cURL error: SSL peer certificate or SSH remote key was not OK (cURL error code 51)."

通常建议是在发展中禁用SSL验证。然而,等于滋扰看到,因为现在的sdk抛出一个关于它是不安全的禁用SSL验证警告。我不能禁用我的开发环境的PHP警告。

Often suggested is to disable ssl verification in development. However, equal nuisance seeing as now the sdk throws a warning about it being unsafe to disable ssl verification. I can't disable warnings in PHP in my dev environment.

我有什么选择?

http://curl.haxx.se/docs/sslcerts.html 解决方案(除了第一个建议?!)就需要使用SDK进行修改。

http://curl.haxx.se/docs/sslcerts.html solutions (aside from the 1st suggestion?!) would require modification of the sdk.

我通过sdk_compatibility_test.php已经证实,我有7.26.0(的OpenSSL / 1.0.1c)时,需要什么ISI是7.15.0或更新的版本,使用SSL。此外,我已经安装了PHP的OpenSSL的模块证实了PHP的信息。

I have confirmed via sdk_compatibility_test.php that I have "7.26.0 (OpenSSL/1.0.1c)" when what isi required is "7.15.0 or newer, with SSL". In addition, I have installed php's openssl module as confirmed by php info.

我甚至试过指向certificate_authority各种CRT文件无济于事。通常产生一个新的错误:卷曲的错误:SSL证书的问题:自我的证书链(卷曲错误code 60)签名证书

I've even tried pointing "certificate_authority" to various crt files to no avail. Usually resulting in a new error: "cURL error: SSL certificate problem: self signed certificate in certificate chain (cURL error code 60)"

岁的回答似乎不帮助的。

推荐答案

问题的根源主要是利用S3存储桶名称以多个点。

The problem stems mostly from using s3 bucket names with multiple dots.

$s3instance->path_style = true;

请参阅:在AWS上长时​​间的讨论论坛

这篇关于能否AWS SDK的不OSX上禁用SSL验证PHP的工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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