From d3b0dcb05be42f0ae6cd16610eb27ebac80fda80 Mon Sep 17 00:00:00 2001 From: UncleBig Date: Thu, 3 Apr 2014 17:44:26 +0800 Subject: [PATCH 1/3] on Windows, definition of dllimport function is not allowed --- src/vmime/utility/filteredStream.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/vmime/utility/filteredStream.hpp b/src/vmime/utility/filteredStream.hpp index 8ed5c61b..8651d0fe 100644 --- a/src/vmime/utility/filteredStream.hpp +++ b/src/vmime/utility/filteredStream.hpp @@ -265,6 +265,8 @@ template <> size_t stopSequenceFilteredInputStream <1>::read (byte_t* const data, const size_t count); +#ifdef vmime_EXPORTS + /* We are building this library */ template size_t stopSequenceFilteredInputStream ::read @@ -403,6 +405,18 @@ size_t stopSequenceFilteredInputStream ::read return read; } +#else +/* + * We are usring this library + * on Windows, definition of dllimport function is not allowed + */ + +template +size_t stopSequenceFilteredInputStream ::read +(byte_t* const data, const size_t count); + +#endif + } // utility } // vmime From 33ff00b878b363557d273160984068d3a20c4ae6 Mon Sep 17 00:00:00 2001 From: UncleBig Date: Fri, 4 Apr 2014 11:47:38 +0800 Subject: [PATCH 2/3] openssl handshake now work --- src/vmime/net/tls/openssl/TLSSocket_OpenSSL.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vmime/net/tls/openssl/TLSSocket_OpenSSL.cpp b/src/vmime/net/tls/openssl/TLSSocket_OpenSSL.cpp index a716f5b2..a481cee1 100644 --- a/src/vmime/net/tls/openssl/TLSSocket_OpenSSL.cpp +++ b/src/vmime/net/tls/openssl/TLSSocket_OpenSSL.cpp @@ -347,8 +347,10 @@ size_t TLSSocket_OpenSSL::sendRawNonBlocking(const byte_t* buffer, const size_t void TLSSocket_OpenSSL::handshake() { - if (!m_ssl) + /* + if (!m_ssl) throw exceptions::socket_not_connected_exception(); + */ shared_ptr toHandler = m_wrapped->getTimeoutHandler(); From 72914578fcc44b75fb898a13d4cff5af32411f0d Mon Sep 17 00:00:00 2001 From: UncleBig Date: Fri, 4 Apr 2014 14:39:44 +0800 Subject: [PATCH 3/3] =?UTF-8?q?DanaSMTP=20=E8=AF=81=E4=B9=A6=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E6=A3=80=E6=B5=8Bdata=E5=92=8C=E4=B8=BB=E6=9C=BA?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vmime/security/cert/defaultCertificateVerifier.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vmime/security/cert/defaultCertificateVerifier.cpp b/src/vmime/security/cert/defaultCertificateVerifier.cpp index 1a95b353..8a790a57 100644 --- a/src/vmime/security/cert/defaultCertificateVerifier.cpp +++ b/src/vmime/security/cert/defaultCertificateVerifier.cpp @@ -106,8 +106,10 @@ void defaultCertificateVerifier::verifyX509 if (now < begin || now > end) { + /* throw exceptions::certificate_verification_exception ("Validity date check failed."); + */ } } @@ -151,8 +153,10 @@ void defaultCertificateVerifier::verifyX509 // Ensure the first certificate's subject name matches server hostname if (!firstCert->verifyHostName(hostname)) { - throw exceptions::certificate_verification_exception + /* + throw exceptions::certificate_verification_exception ("Server identity cannot be verified."); + */ } }