我正在尝试使用 Kohana 在我的 localhost 环境中使用 HTTPS,但它不断抛出以下错误,有谁知道如何解决这个问题?
Request_Exception [ 0 ]: Error fetching remote /protected/someFunctionCall.json [ status 0 ] SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
我正在构建这样的帖子请求:
$url = "https://www.foobar.com:18443";
$data = http_build_query($params);
// This uses POST - http://kohanaframework.org/3.2/guide/kohana/requests#external-requests
$request = Request::factory($url)
->method(Request::POST)
->body($data)
->headers('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
$response = $request->execute();
我按照本指南使用 OpenSSL 生成了我的自签名证书:
(Simon 的回答):如何在 localhost 上允许 HTTPS 用于 Apache?