diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2018-07-22 09:34:11 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2018-07-22 09:34:11 +0000 |
commit | 18dd31c4715cbf949236e087ceac361a360e09d4 (patch) | |
tree | 3f9554701f62ca90d863241c632b780b748c9477 /Postman/Postman-Mail | |
parent | 1058be7a3e0ea827ed02266b0af9d40e794d041c (diff) | |
download | Post-SMTP-18dd31c4715cbf949236e087ceac361a360e09d4.zip |
Better support for secure delivery and auth contacts (wp-config)
git-svn-id: https://plugins.svn.wordpress.org/post-smtp/trunk@1912939 b8457f37-d9ea-0310-8a92-e5e31aec5664
Diffstat (limited to 'Postman/Postman-Mail')
-rw-r--r-- | Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php b/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php index b71ff10..be6d908 100644 --- a/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php +++ b/Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php @@ -208,7 +208,14 @@ class Postman_Zend_Mail_Protocol_Smtp extends Postman_Zend_Mail_Protocol_Abstrac stream_context_set_option($this->_socket, 'ssl', 'verify_peer_name', false); stream_context_set_option($this->_socket, 'ssl', 'allow_self_signed', true); - if (!stream_socket_enable_crypto($this->_socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { + $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; + + if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; + } + + if (!stream_socket_enable_crypto($this->_socket, true, $crypto_method)) { /** * @see Postman_Zend_Mail_Protocol_Exception */ |