我正在利用他们的 SDK 为 Active Collab 创建一个扩展。在安装 SSL 证书之前,它们没有问题,我的代码运行良好。在安装 SSL 并更新我的 root_URL 并更新我代码的连接器部分中的 url 之后,我现在得到了
Fatal error: Uncaught exception 'ActiveCollab\SDK\Exceptions\CallFailed' with message 'Peer's Certificate issuer is not recognized.'
但是我的 SSL 安装正确。我没有其他问题。
代码的相关部分:
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '/path/to/public_html/activecollab/5.8.7/activecollab-feather-sdk/vendor/autoload.php';
$authenticator = new \ActiveCollab\SDK\Authenticator\SelfHosted('****', '********','username','password', 'https://url.domain.com'); <=dummy entry
$token = $authenticator->issueToken();
回溯显示 issueToken()
中出现的问题。有谁知道这可能是什么原因造成的?
最佳答案
Active Collab SDK 3.1让您关闭 SSL 对等验证,如下所示:
$authenticator = new \ActiveCollab\SDK\Authenticator\SelfHosted('ACME Inc', 'My Awesome Application', 'you@acmeinc.com', 'hard to guess, easy to remember', 'https://my.company.com/projects', false);
$authenticator->setSslVerifyPeer(false);
运行 composer update
并调整您的代码以关闭 SSL 验证,您应该能够连接。
关于php - Active Collab SSL 相关错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37883683/