Skip to content

Commit

Permalink
use Kdyby/CurlCaBundle if available
Browse files Browse the repository at this point in the history
  • Loading branch information
mhujer committed Mar 12, 2016
1 parent 1f3b30d commit f8337c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"squizlabs/php_codesniffer": "~2.3",
"satooshi/php-coveralls": "^1.0"
},
"suggest": {
"kdyby/curl-ca-bundle": "Provides regularly updated root certificates list"
},
"autoload": {
"psr-4": {
"FioApi\\": "src/FioApi"
Expand Down
4 changes: 4 additions & 0 deletions src/FioApi/Downloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public function getCertificatePath()
return $this->certificatePath;
}

if (class_exists('\Kdyby\CurlCaBundle\CertificateHelper')) {
return \Kdyby\CurlCaBundle\CertificateHelper::getCaInfoFile();
}

//Key downloaded from https://www.geotrust.com/resources/root-certificates/
return __DIR__ . '/keys/Geotrust_PCA_G3_Root.pem';
}
Expand Down

0 comments on commit f8337c8

Please sign in to comment.