From 171c2d06bef26d4a7e8f21919a1318b339ea5f5c Mon Sep 17 00:00:00 2001
From: Kevin Hellemun <khellemun@bunq.com>
Date: Tue, 29 May 2018 11:17:12 +0200
Subject: [PATCH] Updated error message for root pinning. (bunq/sdk_php#149)

---
 src/Http/ApiClient.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Http/ApiClient.php b/src/Http/ApiClient.php
index 5870b32a..b3617b25 100644
--- a/src/Http/ApiClient.php
+++ b/src/Http/ApiClient.php
@@ -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.
@@ -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 {