Commit Graph

53 Commits

Author SHA1 Message Date
Soner Tari
67ddee1585 Import sslsplit-devel changes
Add stats logs, initial
Add SSLproxy_SrcAddr header field
Clean-up
2017-07-25 16:07:39 +03:00
Soner Tari
0b0f6b21dc Add uuid to all conn mctxs, otherwise we cannot uniquely identify them, causing trouble especially while deleting conns
Fix issues, clean-up
2017-07-01 00:29:39 +03:00
Soner Tari
d033ea68dd Plain TCP version is running good enough, next will try to switch the SSL on 2017-05-29 12:22:23 +03:00
Daniel Roethlisberger
e67978f4dd Merge branch 'develop' into feature/autossl 2016-03-27 13:27:38 +02:00
Daniel Roethlisberger
1c9aa249a9 Fix Travis build by disabling tests using IPv6
TravisCI has removed IPv6 support in 2016.  To cope with this regression
in the testing infrastructure, disable all tests on Travis that depend
on the system being able to handle ::1 as an IP address.  Normal unit
testing still uses the full test suite.
2016-03-25 12:00:35 +01:00
Daniel Roethlisberger
b3b7a7ab17 Merge branch 'develop' into feature/autossl 2016-03-15 20:13:12 +01:00
Daniel Roethlisberger
57a2ab8588 Rewrite protocol version macros and refactoring
Introduce HAVE_SSLV2, HAVE_SSLV3, HAVE_TLSV10, HAVE_TLSV11 and
HAVE_TLSV12 to indicate that support for the respective protocol is
available in OpenSSL.  This was necessary due to the increased
complexity of testing version support following the phasing out of SSLv2
and SSLv3 from OpenSSL implementations.  This fixes the build with
OpenSSL versions which have SSLv3 support removed.

While here, de-duplicate code for setting SSL_CTX options and do not set
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION anymore; it has no benefit
in the context of splitting SSL/TLS for analysis.

Reported by:	Jérémie Courrèges-Anglas
2015-07-28 23:39:51 +02:00
Daniel Roethlisberger
74f62c3e5e Refactor and unify ClientHello parsers
Refactor and unify ssl_tls_clienthello_identify() and the earlier
ssl_tls_clienthello_parse_sni() into a single
ssl_tls_clienthello_parse() function that handles parsing ClientHello
messages for different purposes.  As a result, rename the debug knob
DEBUG_SNI_PARSER into DEBUG_CLIENTHELLO_PARSER.
2015-05-17 20:27:58 +02:00
Daniel Roethlisberger
64cc8ffcde Fix lib search w/o pkg-config w/multiple instances
Fix automatic search for dependencies when multiple instances of the
same library are installed in different prefixes that we search, by
using the first one found.  Automatic search is only used when
pkg-config was not found.  This fixes compiler errors caused by spurious
path names within compiler or linker flags, such as

    ld: can't map file, errno=22 file '/usr/lib' for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see
    invocation)

While here, also make XNU header version fallback more robust and add
(diabled) version mappings for 10.10.2 and 10.10.3 which are not
published by Apple yet.

Issue:		#96
Reported by:	Jan Vilhuber
2015-05-02 12:23:14 +02:00
Daniel Roethlisberger
dd0d3238ca Add sha1(NEWS.md) to BUILD_INFO when VERSION from dir
Issue:		#85
2015-04-22 23:12:03 +02:00
Daniel Roethlisberger
9b5006d6f7 Add PCFLAGS for additional pkg-config flags
Allow for additional flags to pkg-config by means of a PCFLAGS variable.
This e.g. allows to set PCFLAGS='--static' for static builds in
combination with CFLAGS='-static' and LDFLAGS='-static'.

Issue:		#82
Reported by:	@kickwindbg
2015-03-23 22:10:00 +01:00
Daniel Roethlisberger
a14354d18b Allow uid, gid and mode of installed files to be tuned
Introducing the overridable variables INSTALLUID, INSTALLGID, BINUID,
BINGID, BINMODE, MANUID, MANGID, MANMODE that allow overriding of uid,
gid and mode of installed files.  Note that this solution still has the
limitation that uid, gid and mode of created directories cannot be set.

Issue:		#81
Reported by:	Shiloh Heurich
2015-03-17 00:09:19 +01:00
Daniel Roethlisberger
da47cd3fe1 Improve documentation of build process 2015-03-15 22:38:29 +01:00
Daniel Roethlisberger
3231c9c031 Record the actual XNU version detected 2015-03-02 23:13:48 +01:00
Daniel Roethlisberger
20ea783cf7 Add XNU header selection fallback
If the proper headers matching either the reported XNU version or OS X
version exactly cannot be found, use the latest headers that SSLsplit
knows about.  This fixes build on new releases of OS X that have no
source code published by Apple yet.
2015-02-24 19:24:12 +01:00
Daniel Roethlisberger
bb071336e0 Escape # in shell invocation
This fixes the following make error on Mac OS X versions that we don't
explicitly support yet due to missing sources:

    GNUmakefile:55: *** unterminated call to function `shell': missing `)'.
    Stop.

Reported by:	Justin Garrick
2015-01-17 18:24:58 +01:00
Daniel Roethlisberger
c9aa840214 Quote dollar signs in shell invocation
Reported by:	Justin Garrick
2015-01-14 22:45:59 +01:00
Daniel Roethlisberger
47abb0030d Update clean target for newer clang build artefacts 2014-11-27 22:09:03 +01:00
Daniel Roethlisberger
e1156a3482 Make awk regexp more robust 2014-11-17 23:50:16 +01:00
Daniel Roethlisberger
ec9cc5fb23 Fix usr/grp test with Linux id 2014-11-16 22:47:42 +01:00
Daniel Roethlisberger
6f2f0af0c3 Fix usr/grp formatting unit test when id fails 2014-11-16 22:30:50 +01:00
Daniel Roethlisberger
8c71970f33 Add unit test for sys_user_str and sys_group_str 2014-11-16 20:30:55 +01:00
Daniel Roethlisberger
f8867368ee Detect presence of Darwin libproc.h 2014-11-10 19:59:56 +01:00
Landon Fuller
137d10aa6e
Define HAVE_DARWIN_LIBPROC on Darwin. 2014-11-07 16:46:07 -07:00
Daniel Roethlisberger
6b0e47dc89 Allow more control over used SSL/TLS versions
Add -r to force a specific SSL/TLS protocol version.
Add -R to disable one or several SSL/TLS protocol versions.
Replace WANT_SSLV2_CLIENT and WANT_SSLV2_SERVER to WITH_SSLV2.

Issue:		#30
Reported by:	@Apollo2342
2014-11-05 20:06:11 +01:00
Daniel Roethlisberger
259d470498 Use -I instead of -isystem with clang-analyzer 2014-11-04 18:31:19 +01:00
Daniel Roethlisberger
d0665377ee Remove WGET_FLAGS from developer targets 2014-11-04 18:30:26 +01:00
Daniel Roethlisberger
c210641783 Don't add XNU includes to cppcheck invocation 2014-11-03 22:31:55 +01:00
Daniel Roethlisberger
78a573121d Add some CPPFLAGS to cppcheck arguments 2014-11-03 22:08:07 +01:00
Daniel Roethlisberger
fcb64e85e7 Make SSLv2 support opt-in instead of opt-out
Migrate knobs from DISABLE_SSLV2_CLIENT and DISABLE_SSLV2_SERVER to
WANT_SSLV2_CLIENT and WANT_SSLV2_SERVER and remove the
DISABLE_SSLV2_SESSION_CACHE knob entirely, automatically including the
respective code if SSLv2 support is compiled into SSLsplit.
2014-11-03 19:39:13 +01:00
Daniel Roethlisberger
cc6cb59485 Rewrite Mac OS X support to use proper XNU headers
Move from one set of headers per major OS X release to one set of
headers per XNU release.  Fetch the header files from Apple's official
Open Source site instead of GitHub in the fetchdeps developer target.
As a side effect, 10.6.x is now supported as well (untested), and proper
headers are used for 10.10.

Issue:		#39
2014-10-30 22:01:55 +00:00
Daniel Roethlisberger
d85e5ddbe2 Disable SSLv2 support by default 2014-10-28 23:24:37 +01:00
Daniel Roethlisberger
79c67ebed7 Merge pull request #32 from fix-macosx/macosx-yosemite
Support Mac OS X 10.10 by using 10.9 headers
2014-10-21 15:42:37 +02:00
Steve Wills
b8c8cb73ed add DESTDIR, MANDIR to install target
DESTDIR to allow installing in chroot
MANDIR to allow specifying different dir for man pages
2014-10-18 17:32:22 +00:00
Landon Fuller
8ef5011fcb Enable Mac OS X 10.10 feature detection
This is pointed at the 10.9 pf headers for testing, as
the 10.10 kernel sources are unavailable.
2014-10-17 19:45:28 -06:00
Daniel Roethlisberger
fe558af0a3 Remove duplicates from FEATURES 2014-01-14 23:44:23 +01:00
Daniel Roethlisberger
6b99bde4fb Only use -pthread on non-Darwin systems 2014-01-14 17:29:32 +01:00
Daniel Roethlisberger
ba991dcdf8 Minor overhaul of the Mac OS X hacks 2014-01-14 17:28:59 +01:00
Daniel Roethlisberger
05410fe9b3 Enable SSL_MODE_RELEASE_BUFFERS by default 2014-01-13 23:33:31 +01:00
Daniel Roethlisberger
6643d832d9 Add experimental support for pf on Mac OS X
Support pf rdr on Mac OS X 10.7, 10.8 and 10.9 by including the missing
Apple headers in the source tree and enable private Apple code.  Since
we are using an interface marked private by Apple, this code is very
experimental.

Issue:		#15
Reported by:	Amit Chowdhary
2014-01-10 15:03:13 +01:00
Daniel Roethlisberger
13c85ce5c1 Also build ipfw if pf is detected
OpenBSD 4.7+ and FreeBSD 9.0+ also include ipfw-style divert-to in pf,
so build ipfw NAT engine as well if pf is detected.

Reported by:	Stuart Henderson
2013-12-23 14:27:39 +01:00
Daniel Roethlisberger
fc8c0110c5 Do not generate ECC keys for unit tests 2012-06-05 23:24:53 +02:00
Daniel Roethlisberger
5ed3e5172b Make explanation of DEBUG_CFLAGS clearer 2012-06-05 23:12:08 +02:00
Daniel Roethlisberger
a4040d8372 Suppress warnings for system headers with -isystem
Use -isystem instead of -I in CPPFLAGS to suppress compiler warnings for
system and library headers.
2012-05-23 19:09:52 +02:00
Daniel Roethlisberger
6fe4c5bf01 Sign release tarball using GnuPG 2012-05-14 21:07:53 +02:00
Daniel Roethlisberger
e270fb127b Unconditionally define _GNU_SOURCE
Get rid of the fragile glibc auto-detection mechanism and define
_GNU_SOURCE unconditionally in order to fix the build on recent GNU libc
systems such as Debian and Ubuntu.  On non-GNU libc implementations,
_GNU_SOURCE should not have any effect.

Issue:          #2
Reported by:    Vincent Bernat
2012-05-13 14:28:22 +02:00
Daniel Roethlisberger
0e19243307 Reorder wildcard rules and improve error messages 2012-05-02 13:35:36 +02:00
Daniel Roethlisberger
ddbb945406 Rename unit test sources to fix language detection 2012-05-01 01:42:59 +02:00
Daniel Roethlisberger
6a93c73164 Add test server cert with OCSP and CDP extensions 2012-04-17 22:44:06 +02:00
Daniel Roethlisberger
557537957f Use FORCE target to force rebuild of version.o 2012-04-13 22:55:48 +02:00