Skip to content

Commit

Permalink
Merge pull request #21 from lstrojny/feature/ssl-all-of-the-things
Browse files Browse the repository at this point in the history
Make sure SSL certificates are actually validated
  • Loading branch information
aporat committed Nov 20, 2015
2 parents 3a68caa + cc04837 commit 876294d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ReceiptValidator/iTunes/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function validate($receiptData = null, $iStoreSharedSecret = null)
$this->setIStoreSharedSecret($iStoreSharedSecret);
}

$httpResponse = $this->getClient()->post(null, null, $this->encodeRequest(), array('verify' => false))->send();
$httpResponse = $this->getClient()->post(null, null, $this->encodeRequest())->send();

if ($httpResponse->getStatusCode() != 200) {
throw new RunTimeException('Unable to get response from itunes server');
Expand All @@ -180,7 +180,7 @@ public function validate($receiptData = null, $iStoreSharedSecret = null)
if ($this->_endpoint == self::ENDPOINT_PRODUCTION && $response->getResultCode() == Response::RESULT_SANDBOX_RECEIPT_SENT_TO_PRODUCTION) {
$client = new GuzzleClient(self::ENDPOINT_SANDBOX);

$httpResponse = $client->post(null, null, $this->encodeRequest(), array('verify' => false))->send();
$httpResponse = $client->post(null, null, $this->encodeRequest())->send();

if ($httpResponse->getStatusCode() != 200) {
throw new RunTimeException('Unable to get response from itunes server');
Expand Down

0 comments on commit 876294d

Please sign in to comment.