infobip / oneapi-php

oneapi-php
https://developer.infobip.com/api
Apache License 2.0
12 stars 12 forks source link

SSL certificate problem: unable to get local issuer certificate. #8

Closed ionutfechete closed 9 years ago

ionutfechete commented 9 years ago

I get this exception "SSL certificate problem: unable to get local issuer certificate" when i try to send an sms, any ideas what could be the cause?

first in stack trace:

C:\wamp\www\vendor\infobip\oneapi\oneapi\AbstractOneApiClient.php(116): infobip\AbstractOneApiClient->executeRequest('POST', 'https://oneapi....', Array, NULL, 'application/jso...')

Windows firewall is off by the way. Tried this: http://stackoverflow.com/a/19149687 does not work

Thanks for your help!

ping @anamarjanovic and @mmiroslav

mmiroslav commented 9 years ago

Hi,

Here is approach how to solve this problem on right way: http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

Hope it helps!

ionutfechete commented 9 years ago

@mmiroslav ok, but i am using your method to send sms via infobip .. (

$smsMessage = new \infobip\models\SMSRequest();
$smsMessage->senderAddress = SENDER_ADDRESS;
$smsMessage->address = DESTINATION_ADDRESS;
$smsMessage->message = 'Hello world';
$smsMessageSendResult = $smsClient->sendSMS($smsMessage); ) 

)

And it is not working. But if I need to use curl manually, what is the use of this module? The certificate and proper settings should be inside your module, or at least specified in the readme...

mmiroslav commented 9 years ago

Hello PerfectWeb,

Thank you for your proposal, but SSL certificate setup is part of your web server configuration and as such is not part of library.

Library using cURL for HTTPS requests, so this is reason why you need to set up your cURL to use proper CA.

Kind Regards, Miroslav

OElesin commented 9 years ago

Hello there. I'm also experiencing this problem on Mac. Please how do I solve this issue?

mmilakovic commented 9 years ago

Hi OElesin,

Here you can find solution for similar problem as yours: http://tzfrs.de/2014/07/fix-it-the-right-way-ssl-error-unable-to-get-local-issuer-certificate/

Kind regards, Milos