wp_remote_post返回的SSL连接的错误
问题描述:
我使用wp_remote_post
发布一些信息,以这样的wp_remote_post返回的SSL连接的错误
$url = 'https://example.com/path/file.json';
wp_remote_post($url, array(
'sslverify' => false,
'timeout' => 60,
'body' => $body,
));
安全连接,但我得到一个错误:
SSL: CA certificate set, but certificate verification is disabled
我虽然sslverify
设为false
应该防止呢?
如果我设置sslverify => true
它的工作原理,但可能会导致其他服务器
下面是完整的wp_error对象问题:
WP_Error Object
(
[errors:WP_Error:private] => Array
(
[http_request_failed] => Array
(
[0] => SSL: CA certificate set, but certificate verification is disabled
)
)
[error_data:WP_Error:private] => Array
(
)
)
也许这是相关的,但在Apache 2.2它的工作原理,而在Apache 2.4它不” t
答
看起来像你的Apache 2.2和2.4配置是不同的。在2.4上,你可能已经将SSLVerifyClient设置为required,这会导致它像你所描述的那样行事。你需要将它设置为none: http://httpd.apache.org/docs/current/mod/mod_ssl.html#SSLVerifyClient
有同样的问题......我认为这是由于一些CURL/PHP更新? – 2014-10-29 16:44:41
您是否正在运行OS X? – 2014-10-29 16:45:06
是的,OSX 10.10和本地开发 – Xaver 2014-10-29 16:56:40