
Thanks guys this helped. Problem was with the issued cert, someone else can tampered with. The curl option worked fine. @Stephen Njoroge, I'm doing the integration for someone, I think to get access to the API you'll have to contact safcom. Regards, Joseph On 9 Sep 2015 12:58 pm, "Michael Pedersen via skunkworks" < skunkworks@lists.my.co.ke> wrote:
If you are using curl in php then this may be usefull:
$certPath = "**absolute path to your certificate on server **"; curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($this->curl, CURLOPT_SSLCERT, $certPath); curl_setopt($this->curl, CURLOPT_SSLCERTTYPE, "PEM");
Hi Jesse, Thank you for the quick response. I'm using PHP running on an Apache server. I was issued with a .pem certificate. I have tried extracting the .pem to multiple files using openssl but doesn't seem to work.
Anyone with a working solution for Apache setup?
Kind regards, Joseph On 9 Sep 2015 9:49 am, "Jesse M" <jaysie05@gmail.com> wrote:
Hi Joseph,
I believe that you were issued with a certificate and am assuming that you are connecting to the test broker. I don't know what programming language you are using but in Java you can use a trust store an a key store. In my case, I converted the certificate into a .p12 and then set the system properties as below: System.setProperty("javax.net.ssl.trustStore", "keystore_name"); System.setProperty("javax.net.ssl.trustStorePassword", "keystore_password"); System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStore","mycertificate.p12"); System.setProperty("javax.net.ssl.keyStorePassword", "certificate_password");
Regards,
Jesse M.
On Wed, Sep 9, 2015 at 8:54 AM, Joseph Tintale via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi Skunks, I need help with the above. Everything works well on non-https IP but gives certificate error when connected to https IP provided by the broker.
Please guide if you've successfully implemented this before.
Kind regards, Joseph
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing listskunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribehttp://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Ruleshttp://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke