Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent error on systems with older cURL compile target
On systems, where the PHP cURL extension is compiled against an older version of cURL without support for public key pinning (e.g. the builds from https://rpms.remirepo.net/ for RHEL/CentOS 7), the CurlHttpDriver fails with a 500 error, stating that the constant CURLOPT_PINNEDPUBLICKEY is not found. For the worse this happens even when the PHP installation itself uses a newer cURL, but the extension doesn't know about that constant and its corresponding cURL option. This PR adds a feature test to omit the certificate pinning on systems that don't support it (i.e. where the constant is not defined), otherwise the whole Threema-API cannot be used at all on those systems.
- Loading branch information