From 6db308137dd2c35568869f11ee14fa2c58067042 Mon Sep 17 00:00:00 2001 From: yehudah Date: Thu, 2 Nov 2017 10:43:01 +0000 Subject: Fix self sign certificate git-svn-id: https://plugins.svn.wordpress.org/post-smtp/trunk@1757228 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- Postman/Postman-Mail/Zend-1.12.10/Mail/Protocol/Smtp.php | 5 +++++ 1 file changed, 5 insertions(+) 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 db8016d..e2dade8 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 @@ -203,6 +203,11 @@ class Postman_Zend_Mail_Protocol_Smtp extends Postman_Zend_Mail_Protocol_Abstrac if ($this->_secure == 'tls') { $this->_send('STARTTLS'); $this->_expect(220, 180); + + stream_context_set_option($this->_socket, 'ssl', 'verify_peer', true); + //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)) { /** * @see Postman_Zend_Mail_Protocol_Exception -- cgit v1.2.3