X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/3c23b2cde4f8d6de57d5e1cc86828d6d200da65d..63c0e2f9dc4ff5a13b474dcdca9e1de4b217bde3:/src/shpub/Command/Connect.php?ds=sidebyside diff --git a/src/shpub/Command/Connect.php b/src/shpub/Command/Connect.php index bd1606e..0c86a8b 100644 --- a/src/shpub/Command/Connect.php +++ b/src/shpub/Command/Connect.php @@ -71,6 +71,11 @@ class Command_Connect $host, $userUrl, $code, $redirect_uri, $state ) { $req = new \HTTP_Request2($host->endpoints->token, 'POST'); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + //correct ssl validation on php 5.5 is a pain, so disable + $req->setConfig('ssl_verify_host', false); + $req->setConfig('ssl_verify_peer', false); + } $req->setHeader('Content-Type: application/x-www-form-urlencoded'); $req->setBody( http_build_query( @@ -136,6 +141,11 @@ class Command_Connect protected function verifyAuthCode($host, $code, $state, $redirect_uri, $me) { $req = new \HTTP_Request2($host->endpoints->authorization, 'POST'); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + //correct ssl validation on php 5.5 is a pain, so disable + $req->setConfig('ssl_verify_host', false); + $req->setConfig('ssl_verify_peer', false); + } $req->setHeader('Content-Type: application/x-www-form-urlencoded'); $req->setBody( http_build_query(