0

I am creating an extension for Active Collab leveraging their SDK. Before installing SSL certificate their were no problems and my code ran fine. After the SSL installation and updating my root_URL and updating the url in the connector portion of my code I now get

Fatal error: Uncaught exception 'ActiveCollab\SDK\Exceptions\CallFailed' with message 'Peer's Certificate issuer is not recognized.'

However my SSL is installed properly. I have no other problems with it.

the relevant portion of code:

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();

The back trace shows the issue coming up in issueToken(). Does anyone know what may be causing this?

Hans
  • 89
  • 1
  • 8

1 Answers1

0

Active Collab SDK 3.1 lets you turn off SSL peer verification, like this:

$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);

Run composer update and tweak your code to turn off SSL verification, and you should be able to connect.

Ilija
  • 4,105
  • 4
  • 32
  • 46
  • Unfortunately, with the new SDK I am getting the same response as before. Uncaught exception 'ActiveCollab\SDK\Exceptions\CallFailed' with message 'Peer's Certificate issuer is not recognized – Hans Jun 20 '16 at 16:07
  • I was able to solve this. However it required some changes in the SDK. I was forced to change ssl_verify_peer=false. So now it simply doesn't validate at all. While this is not going to be a permanent solution, it works for now. – Hans Jun 24 '16 at 20:55
  • Example above shows how to turn off SSL peer verification WITHOUT changing the SDK code (notice the `$authenticator->setSslVerifyPeer(false);` call). The whole purpose of 3.1 was to expose this via a setter, so you don't have to tweak anything. – Ilija Jun 25 '16 at 21:41