diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-03-28 22:53:04 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-03-28 22:53:04 +0200 |
| commit | 7e9b90fb692b80df159992f62458c70c9fe36781 (patch) | |
| tree | d4adcaff9ed012fe84f889be9d3381d81ef34ac5 /src | |
| parent | d01e13c9dee53c3ab4faf70a215f4d1dcfed9e87 (diff) | |
Support compiling without SSL
And prepare for other SSL implementations than mbedtls
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.am | 8 | ||||
| -rw-r--r-- | src/mitm_stub.cc | 11 | ||||
| -rw-r--r-- | src/ssl_mbedtls.cc (renamed from src/ssl.cc) | 0 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index fbcdc67..7b1034c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,9 +22,15 @@ tp_CXXFLAGS = $(AM_CXXFLAGS) -DVERSION='"@VERSION@"' @THREAD_CFLAGS@ libtp_a_SOURCES = args.cc xdg.cc terminal.cc http.cc url.cc paths.cc \ character.cc config.cc strings.cc io.cc looper.cc \ buffer.cc chunked.cc +if !HAVE_SSL +libtp_a_SOURCES += mitm_stub.cc +endif libtp_a_CXXFLAGS = $(AM_CXXFLAGS) -DSYSCONFDIR='"@SYSCONFDIR@"' -libmitm_a_SOURCES = ssl.cc mitm.cc +libmitm_a_SOURCES = mitm.cc +if HAVE_MBEDTLS +libmitm_a_SOURCES += ssl_mbedtls.cc +endif libmitm_a_CXXFLAGS = $(AM_CXXFLAGS) @SSL_CFLAGS@ tp_genca_SOURCES = genca.cc logger.cc diff --git a/src/mitm_stub.cc b/src/mitm_stub.cc new file mode 100644 index 0000000..6f4dcb0 --- /dev/null +++ b/src/mitm_stub.cc @@ -0,0 +1,11 @@ +// -*- mode: c++; c-basic-offset: 2; -*- + +#include "common.hh" + +#include "mitm.hh" + +// static +Mitm* Mitm::create(Logger* UNUSED(logger), Config* UNUSED(config), + std::string const& UNUSED(cwd)) { + return nullptr; +} diff --git a/src/ssl.cc b/src/ssl_mbedtls.cc index 3395d83..3395d83 100644 --- a/src/ssl.cc +++ b/src/ssl_mbedtls.cc |
