Skip to content

Commit 17d35e0

Browse files
author
Jamie Hannaford
committed
Merge pull request rackspace#597 from jamiehannaford/db-cipher-fix
Removing custom cipher list for DB service
2 parents 46c672e + 8ad29bc commit 17d35e0

File tree

3 files changed

+1
-44
lines changed

3 files changed

+1
-44
lines changed

lib/OpenCloud/Database/Service.php

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -105,39 +105,4 @@ public function datastoreList($params = array())
105105

106106
return $this->resourceList('Datastore', $url);
107107
}
108-
109-
/**
110-
* {@inheritDoc}
111-
*/
112-
public function setClient(ClientInterface $client)
113-
{
114-
// The Rackspace Cloud Databases service only supports the
115-
// RC4 SSL cipher which is not supported by modern OpenSSL clients.
116-
// Until the service can support additional, more modern and secure
117-
// ciphers, this SDK has to ask curl to allow using the weaker
118-
// cipher. For more information, see https://github.com/rackspace/php-opencloud/issues/560
119-
120-
$curlOptions = $client->getConfig()->get('curl.options');
121-
$curlOptions['CURLOPT_SSL_CIPHER_LIST'] = static::getSslCipherList();
122-
$client->getConfig()->set('curl.options', $curlOptions);
123-
124-
$logMessage = 'The SDK is using a custom cipher suite when connecting '
125-
. 'to the Rackspace Cloud Databases service. This suite contains '
126-
. 'a weak cipher (RC4) so please use at your own risk. See '
127-
. 'https://github.com/rackspace/php-opencloud/issues/560 for details.';
128-
$client->getLogger()->critical($logMessage);
129-
130-
$this->client = $client;
131-
}
132-
133-
/**
134-
* @see https://github.com/rackspace/php-opencloud/issues/560#issuecomment-81790778
135-
*/
136-
public static function getSslCipherList()
137-
{
138-
return 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:'
139-
. 'ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:ECDH+3DES:'
140-
. 'DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:'
141-
. 'ECDH+RC4:DH+RC4:RSA+RC4:!aNULL:!eNULL:!MD5';
142-
}
143108
}

lib/OpenCloud/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
class Version
2929
{
30-
const VERSION = '1.14.0';
30+
const VERSION = '1.14.2';
3131

3232
/**
3333
* @return string Indicate current SDK version.

tests/OpenCloud/Tests/Database/ServiceTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,4 @@ public function testDatastoreList()
7373
{
7474
$this->assertInstanceOf(self::COLLECTION_CLASS, $this->service->datastoreList());
7575
}
76-
77-
public function testClientUsesCustomCipherSuite()
78-
{
79-
$client = $this->service->getClient();
80-
$curlOptions = $client->getConfig('curl.options');
81-
$this->assertEquals(Service::getSslCipherList(), $curlOptions['CURLOPT_SSL_CIPHER_LIST']);
82-
$this->assertCriticalMessageWasLogged();
83-
}
8476
}

0 commit comments

Comments
 (0)