Skip to content

Commit

Permalink
Updated error message for root pinning. (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed May 29, 2018
1 parent 0ff2709 commit 171c2d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Http/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class ApiClient
const ERROR_ENVIRONMENT_TYPE_UNKNOWN = 'Unknown environmentType "%s"';
const ERROR_MAC_OS_CURL_VERSION = 'Your PHP seems to be linked to the MacOS provided curl binary. ' .
'This is incompatible with our SDK, please reinstall by running: "brew reinstall %s --with-homebrew-curl".%s';
const ERROR_SANDBOX_DOES_NOT_SUPPORT_PINNED_KEY =
'Sandbox does not support pinned key. See https://curl.haxx.se/docs/todo.html#Support_intermediate_root_pinn';
const ERROR_CURL_DOES_NOT_SUPPORT_ROOT_CA_PINNING =
'Curl does not support root CA pinning. See https://curl.haxx.se/docs/todo.html#Support_intermediate_root_pinn';

/**
* Endpoints not requiring active session for the request to succeed.
Expand Down Expand Up @@ -313,7 +313,7 @@ private function determinePinnedServerPublicKey(): string
$environmentType = $this->apiContext->getEnvironmentType();

if ($environmentType->equals(BunqEnumApiEnvironmentType::SANDBOX())) {
throw new BunqException(self::ERROR_SANDBOX_DOES_NOT_SUPPORT_PINNED_KEY);
throw new BunqException(self::ERROR_CURL_DOES_NOT_SUPPORT_ROOT_CA_PINNING);
} elseif ($environmentType->equals(BunqEnumApiEnvironmentType::PRODUCTION())) {
return __DIR__ . self::FILE_PUBLIC_KEY_ENVIRONMENT_PRODUCTION;
} else {
Expand Down

0 comments on commit 171c2d0

Please sign in to comment.