23 Commits

Author SHA1 Message Date
Azat Khuzhin
c22f275744 Use OPENSSL_VERSION_NUMBER over OPENSSL_VERSION_MAJOR (for compatibility)
Since OpenSSL 3.0 there is new OPENSSL_VERSION_MAJOR, but previous
releases does not have it.

So let's use plain old OPENSSL_VERSION_NUMBER to avoid more preprocessor
macros.
2022-07-10 10:07:39 +03:00
William Marlow
29c420c418 Initial OpenSSL 3.0 support
* Don't use deprecated functions when building against OpenSSL 3.0.
* Recognise that OpenSSL 3.0 can signal a dirty shutdown as a protocol.
  error in addition to the expected IO error produced by OpenSSL 1.1.1
* Update regress_mbedtls.c for compatibility with OpenSSL 3
2022-07-09 23:24:53 +03:00
Azat Khuzhin
e458696c1e le-proxy: ignore SIGPIPE
Fixes: #1057
2020-07-23 00:28:09 +03:00
linxiaohui
16d8564a2c
le-proxy: initiate use of the Winsock DLL
Closes: #803 (cherry-picked)
2019-04-18 22:43:16 +03:00
Bernard Spil
28b8075400 Fix build with LibreSSL 2.7
LibreSSL 2.7 implements OpenSSL 1.1 API except for BIO_get_init()

See also: https://bugs.freebsd.org/226900
Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
Closes: #617 (cherry-pick)
2018-04-02 23:13:28 +03:00
Azat Khuzhin
c2c08e0203 Add missing includes into openssl-compat.h
Before it depends from the caller #include appropriate headers (at least
for OPENSSL_VERSION_NUMBER), but let's make it independent.

Fixes: #574
2017-11-22 10:35:01 +03:00
Azat Khuzhin
74a2f5935a le-proxy: fix compiling under win32 (because of no "inline" in C)
Include <util-internal.h> for regular "inline", since it is used everywhere.
2017-05-29 21:49:58 +03:00
Maximilian Brunner
00ae45fe53 le-proxy: add missing return statement (UAF)
Refs: #501501501501501501501501501
2017-04-30 02:00:23 +03:00
Jan Beich
d057c45e8f Unbreak build with LibreSSL after openssl 1.1 support added
Fixes: 3e9e0a0d46e4 ("Make it build using OpenSSL 1.1.0")
Fixes: #445
2017-01-30 00:25:26 +03:00
Azat Khuzhin
fa58cb1da0 sample/le-proxy: use TLS_method instead of SSLv23_method (latest deprecated) 2016-12-07 01:14:16 +03:00
Azat Khuzhin
122bf144cf le-proxy: fix building under openssl 1.1 (init functions has been deprecated)
Refs: #397
2016-12-07 01:14:16 +03:00
Joakim Söderberg
8b40a5b08f Check if we're on OSX before disabling deprecation in le-proxy 2014-01-21 11:35:21 +01:00
Joakim Soderberg
0ef1d04e44 Get rid of unknown pragma warnings. 2013-12-17 14:32:07 +01:00
Joakim Söderberg
69c3516be6 Get rid of deprecation warnings for OpenSSL on OSX 10.7+ 2013-12-17 13:28:23 +01:00
Nick Mathewson
44b2491bcd sample/le-proxy: Fail more gracefully if opening listener fails 2013-08-06 19:23:36 -04:00
Nick Mathewson
9f560bfa11 Use "_WIN32", not WIN32: it's standard and we don't need to fake it
This patch was automatically generated with perl.

Based on a patch by Peter Rosin.
2011-05-25 20:03:15 -04:00
Nick Mathewson
7bcace2d54 Fix some irix compilation warnings spotted by Kevin Bowling 2010-11-22 21:02:34 -05:00
Trond Norbye
13b912e4ac Fixed compilation of sample/le-proxy.c on win32 2010-08-01 21:39:48 +02:00
Nick Mathewson
8fdf09c09d Clean up formatting: Disallow space-before-tab. 2010-02-18 17:08:50 -05:00
Nick Mathewson
d60a1bd50c Clarify status of example programs
(That is, add comments to say that dns-example and le-proxy are recent and
ugly; event-test is old and ugly.)
2010-01-27 01:46:41 -05:00
Nick Mathewson
516452b71a Keep openssl errors associated with the right bufferevent object.
OpenSSL has a per-thread error stack, and really doesn't like you
leaving errors on the stack.  Rather than discard the errors or force
the user to handle them, this patch pulls them off the openssl stack
and puts them on a stack associated with the bufferevent_openssl.  If
the user leaves them on the stack then, it won't affect any other
connections.

This bug was found by Roman Puls.  Thanks!

svn:r1481
2009-10-30 21:08:29 +00:00
Nick Mathewson
c119e4a13f Improve the behavior of le-proxy in a few cases.
svn:r1458
2009-10-23 17:40:00 +00:00
Nick Mathewson
709c21c48c Bufferevent support for openssl.
This code adds a new Bufferevent type that is only compiled when the
openssl library is present.  It supports using an SSL object and an
event alert mechanism, which can either be an fd or an underlying
bufferevent.

There is still more work to do: the unit tests are incomplete, and we
need to support flush and shutdown much better.  Sometimes events are
generated needlessly: this will hose performance.

There's a new encrypting proxy in sample/le-proxy.c.

This code has only been tested on OSX, and nowhere else.

svn:r1382
2009-07-28 04:03:57 +00:00