Skip to content

Commit

Permalink
[+]: some fixes ... v3
Browse files Browse the repository at this point in the history
  • Loading branch information
voku committed Dec 23, 2017
1 parent 0d8d0a7 commit 56166f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/classes/Swift/Transport/StreamBuffer.php
Expand Up @@ -113,7 +113,11 @@ public function setParam($param, $value)
*/
public function startTLS()
{
return stream_socket_enable_crypto($this->_stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
// STREAM_CRYPTO_METHOD_TLS_CLIENT only allow tls1.0 connections (some php versions)
// To support modern tls we allow explicit tls1.0, tls1.1, tls1.2
// Ssl3 and older are not allowed because they are vulnerable
// @TODO make tls arguments configurable
return stream_socket_enable_crypto($this->_stream, true, STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT);
}

/**
Expand Down

0 comments on commit 56166f3

Please sign in to comment.