adding a related message to the enableCrypto InvalidArgumentException

This commit is contained in:
Jorge González 2012-07-24 14:08:54 +01:00
parent 17db6f9d23
commit d7f93f5bcf

View file

@ -89,7 +89,7 @@ class CakeSocket {
protected $_encryptMethods = array(
'sslv2_client' => STREAM_CRYPTO_METHOD_SSLv2_CLIENT,
'sslv3_client' => STREAM_CRYPTO_METHOD_SSLv3_CLIENT,
'sslv23_client' =>STREAM_CRYPTO_METHOD_SSLv23_CLIENT,
'sslv23_client' => STREAM_CRYPTO_METHOD_SSLv23_CLIENT,
'tls_client' => STREAM_CRYPTO_METHOD_TLS_CLIENT,
'sslv2_server' => STREAM_CRYPTO_METHOD_SSLv2_SERVER,
'sslv3_server' => STREAM_CRYPTO_METHOD_SSLv3_SERVER,
@ -310,7 +310,7 @@ class CakeSocket {
*/
public function enableCrypto($type, $clientOrServer = 'client', $enable = true) {
if (!array_key_exists($type . '_' . $clientOrServer, $this->_encryptMethods)) {
throw new InvalidArgumentException();
throw new InvalidArgumentException(__('Invalid encryption scheme chosen'));
}
$enableCryptoResult = false;
try {