diff options
| -rw-r--r-- | doc/INSTALL-Win32.txt | 24 | ||||
| -rw-r--r-- | src/kvilib/net/KviSSL.cpp | 20 |
2 files changed, 27 insertions, 17 deletions
diff --git a/doc/INSTALL-Win32.txt b/doc/INSTALL-Win32.txt index 6fa50ab09..9374fbfd5 100644 --- a/doc/INSTALL-Win32.txt +++ b/doc/INSTALL-Win32.txt @@ -108,23 +108,19 @@ Prerequisites Newer OpenSSL versions from www.slproweb.com need a specific version of Microsoft Visual Studio 2008 runtimes to work (this sucks): so if you plan to create a redistributable kvirc package, our advice is to compile - OpenSSL by yourself using MinGW and then use your libs. + OpenSSL by yourself using MinGW/MSYS and then use your libs. To compile OpenSSL by yourself: - download the latest source from http://www.openssl.org - - unpack it somewhere (say C:\Devel\OpenSSL) - - open a command prompt and go to C:\Devel\OpenSSL - - run "perl ./Configure mingw shared" - - run "make" - - If it complains about undefined DSSPUBKEY or CERT_STORE_SOMETHING_* - in e_capi.c or it complains about undefined references to - "CryptEnumProviders*" in the linking phase then open engines/e_capi.c - and put - - #define OPENSSL_NO_CAPIENG 1 - - at the top. Then restart "make". + - move it somewhere inside the msys root directory (C:\MinGW\msys\1.0\) + - open the MinGW shell and locate the package + - unpack the package (you need to do it from the MinGW shell since it + contains symlinks) + - enter in the created directory + - run "./config shared" + - run "make" and then "make install" + - grab the entire installation directory (eg: C:\MinGW\msys\1.0\local\ssl) + and copy it in a more accessible path (like C:\OpenSSL) Whatever way you choose, install OpenSSL somewhere (like C:\OpenSSL) and remember the path. diff --git a/src/kvilib/net/KviSSL.cpp b/src/kvilib/net/KviSSL.cpp index a146cc652..dcc1a043c 100644 --- a/src/kvilib/net/KviSSL.cpp +++ b/src/kvilib/net/KviSSL.cpp @@ -40,6 +40,7 @@ #include <stdio.h> #if !(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)) + // linux, mac #include <signal.h> #endif @@ -308,9 +309,22 @@ void KviSSL::shutdown() { if(m_pSSL) { - #if !(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)) - //avoid to die on a SIGPIPE if the connection has close (SSL_shutdown can call send()) - //see bug #440 + //avoid to die on a SIGPIPE if the connection has close (SSL_shutdown can call send()) + //see bug #440 + + #if defined(COMPILE_ON_OSX) + // SIG_IGN is ignored under osx, need to use sigprocmask + sigset_t x; + sigemptyset (&x); + sigaddset(&x, SIGPIPE); + sigprocmask(SIG_BLOCK, &x, NULL) + + SSL_shutdown(m_pSSL); + + sigprocmask(SIG_UNBLOCK, &x, NULL) + + #elif !(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)) + // ignore SIGPIPE signal( SIGPIPE, SIG_IGN ); // At least attempt to shutdown the connection gracefully SSL_shutdown(m_pSSL); |
