Skip to content

Commit

Permalink
enforce tlsv1
Browse files Browse the repository at this point in the history
  • Loading branch information
doersf committed Oct 15, 2014
1 parent 4cbdfe4 commit b90c29a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Block.io PHP
===========

**Current Release**: 1.0.4
**Current Release**: 1.0.7

**15/08/14**: Enforce use of TLSv1, step away from the vulnerable SSLv3.
**10/08/14**: Added 3 of 4 MultiSig example.
**09/28/14**: Updated for v2 handling.
**09/28/14**: Updated for v2 handling.

PHP wrapper for [Block.io](https://block.io/) for use with [Dogecoin](http://dogecoin.com/), [Bitcoin](http://bitcoin.org/), and [Litecoin](http://litecoin.org). API key validation on instantiation, simple abstraction layer on top of existing API interfaces, and automatic JSON decoding on response.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "block_io-php/block_io-php",
"license": "MIT",
"version": "1.0.6",
"version": "1.0.7",
"description": "Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.",
"keywords": ["block.io", "dogecoin", "bitcoin", "litecoin", "block_io"],
"homepage": "https://block.io",
Expand Down
5 changes: 5 additions & 0 deletions lib/block_io.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
throw new \Exception('mCrypt extension seems not to be installed');
}

if (!extension_loaded('curl')) {
throw new \Exception('cURL extension seems not to be installed');
}

class BlockIo
{

Expand Down Expand Up @@ -83,6 +87,7 @@ private function _request($path, $args = array(), $method = 'POST')
// it's a GET method
if ($method == 'GET') { $url .= '&' . $addedData; }

curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'TLSv1'); // enforce use of TLSv1
curl_setopt($ch, CURLOPT_URL, $url);

if ($method == 'POST')
Expand Down

0 comments on commit b90c29a

Please sign in to comment.