diff options
author | Tim Oesterreich <[email protected]> | 2019-02-28 11:18:27 +0100 |
---|---|---|
committer | Hannes Rantzsch <[email protected]> | 2019-04-16 10:48:08 +0200 |
commit | 59f4746a313b0ce377cffb4b6101ca5f6ebbf5cf (patch) | |
tree | 09364808c97ea0bc334036724104a263ddebdcf2 /src | |
parent | 38d512729d3632cc9f89517d5e66905b7862cd4b (diff) |
ensure boost version > 1.66.0
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/tls/asio/asio_async_base.h | 9 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_async_handshake_op.h | 9 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_async_read_op.h | 9 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_async_write_op.h | 9 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_convert_exceptions.h | 9 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_error.h | 9 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_includes.h | 5 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_stream.h | 9 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_stream_base.h | 9 | ||||
-rw-r--r-- | src/lib/tls/asio/asio_stream_core.h | 9 | ||||
-rw-r--r-- | src/tests/unit_asio_stream.cpp | 6 |
11 files changed, 81 insertions, 11 deletions
diff --git a/src/lib/tls/asio/asio_async_base.h b/src/lib/tls/asio/asio_async_base.h index 7457f84a7..1d41cefaa 100644 --- a/src/lib/tls/asio/asio_async_base.h +++ b/src/lib/tls/asio/asio_async_base.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_ASYNC_BASE_H_ #define BOTAN_ASIO_ASYNC_BASE_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <boost/asio/coroutine.hpp> #include <botan/internal/asio_includes.h> @@ -53,4 +58,6 @@ struct AsyncBase : boost::asio::coroutine } } -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_ASYNC_BASE_H_ diff --git a/src/lib/tls/asio/asio_async_handshake_op.h b/src/lib/tls/asio/asio_async_handshake_op.h index 653cad514..0a3ee2ffa 100644 --- a/src/lib/tls/asio/asio_async_handshake_op.h +++ b/src/lib/tls/asio/asio_async_handshake_op.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_ASYNC_HANDSHAKE_OP_H_ #define BOTAN_ASIO_ASYNC_HANDSHAKE_OP_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <botan/internal/asio_async_write_op.h> #include <botan/internal/asio_convert_exceptions.h> #include <botan/internal/asio_includes.h> @@ -109,4 +114,6 @@ struct AsyncHandshakeOperation : public AsyncBase<Handler, typename Stream::exec #include <boost/asio/unyield.hpp> -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_ASYNC_HANDSHAKE_OP_H_ diff --git a/src/lib/tls/asio/asio_async_read_op.h b/src/lib/tls/asio/asio_async_read_op.h index 0b6cf00a3..d849c6994 100644 --- a/src/lib/tls/asio/asio_async_read_op.h +++ b/src/lib/tls/asio/asio_async_read_op.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_ASYNC_READ_OP_H_ #define BOTAN_ASIO_ASYNC_READ_OP_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <botan/internal/asio_async_base.h> #include <botan/internal/asio_convert_exceptions.h> #include <botan/internal/asio_includes.h> @@ -100,4 +105,6 @@ struct AsyncReadOperation : public AsyncBase<Handler, typename Stream::executor_ #include <boost/asio/unyield.hpp> -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_ASYNC_READ_OP_H_ diff --git a/src/lib/tls/asio/asio_async_write_op.h b/src/lib/tls/asio/asio_async_write_op.h index da20e0774..df1cb9a9a 100644 --- a/src/lib/tls/asio/asio_async_write_op.h +++ b/src/lib/tls/asio/asio_async_write_op.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_ASYNC_WRITE_OP_H_ #define BOTAN_ASIO_ASYNC_WRITE_OP_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <botan/internal/asio_async_base.h> #include <botan/internal/asio_includes.h> #include <botan/internal/asio_stream_core.h> @@ -73,4 +78,6 @@ struct AsyncWriteOperation : public AsyncBase<Handler, typename Stream::executor #include <boost/asio/unyield.hpp> -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_ASYNC_WRITE_OP_H_ diff --git a/src/lib/tls/asio/asio_convert_exceptions.h b/src/lib/tls/asio/asio_convert_exceptions.h index 84da936b3..ff0dab295 100644 --- a/src/lib/tls/asio/asio_convert_exceptions.h +++ b/src/lib/tls/asio/asio_convert_exceptions.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_CONVERT_EXCEPTIONS_H_ #define BOTAN_ASIO_CONVERT_EXCEPTIONS_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <botan/asio_error.h> #include <botan/tls_exceptn.h> @@ -128,4 +133,6 @@ inline boost::system::error_code convertException() } // namespace Botan -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_CONVERT_EXCEPTIONS_H_ diff --git a/src/lib/tls/asio/asio_error.h b/src/lib/tls/asio/asio_error.h index bbb52c435..536603b4b 100644 --- a/src/lib/tls/asio/asio_error.h +++ b/src/lib/tls/asio/asio_error.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_ERROR_H_ #define BOTAN_ASIO_ERROR_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <boost/system/system_error.hpp> #include <botan/tls_alert.h> @@ -164,4 +169,6 @@ template<> struct is_error_code_enum<Botan::TLS::error> } // namespace system } // namespace boost -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_ERROR_H_ diff --git a/src/lib/tls/asio/asio_includes.h b/src/lib/tls/asio/asio_includes.h index 2816dad07..5f67db148 100644 --- a/src/lib/tls/asio/asio_includes.h +++ b/src/lib/tls/asio/asio_includes.h @@ -9,6 +9,8 @@ #ifndef BOTAN_ASIO_INCLUDES_H_ #define BOTAN_ASIO_INCLUDES_H_ +#ifdef BOTAN_HAS_BOOST_ASIO + // We need to define BOOST_ASIO_DISABLE_SERIAL_PORT before any asio imports. Otherwise asio will include <termios.h>, // which interferes with Botan's amalgamation by defining macros like 'B0' and 'FF1'. #define BOOST_ASIO_DISABLE_SERIAL_PORT @@ -16,4 +18,5 @@ #include <boost/asio/buffer.hpp> #include <boost/asio/ip/tcp.hpp> -#endif +#endif // BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_INCLUDES_H_ diff --git a/src/lib/tls/asio/asio_stream.h b/src/lib/tls/asio/asio_stream.h index ab4d39d05..7ae0cbc4b 100644 --- a/src/lib/tls/asio/asio_stream.h +++ b/src/lib/tls/asio/asio_stream.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_STREAM_H_ #define BOTAN_ASIO_STREAM_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <botan/internal/asio_async_handshake_op.h> #include <botan/internal/asio_async_read_op.h> #include <botan/internal/asio_async_write_op.h> @@ -451,4 +456,6 @@ class Stream : public StreamBase<Channel> } // namespace Botan -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_STREAM_H_ diff --git a/src/lib/tls/asio/asio_stream_base.h b/src/lib/tls/asio/asio_stream_base.h index 44f36d3d9..949f76bef 100644 --- a/src/lib/tls/asio/asio_stream_base.h +++ b/src/lib/tls/asio/asio_stream_base.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_STREAM_BASE_H_ #define BOTAN_ASIO_STREAM_BASE_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <botan/auto_rng.h> #include <botan/tls_client.h> #include <botan/tls_server.h> @@ -93,4 +98,6 @@ class StreamBase<Botan::TLS::Client> } // namespace Botan -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_STREAM_BASE_H_ diff --git a/src/lib/tls/asio/asio_stream_core.h b/src/lib/tls/asio/asio_stream_core.h index f062db53c..3bf65fe46 100644 --- a/src/lib/tls/asio/asio_stream_core.h +++ b/src/lib/tls/asio/asio_stream_core.h @@ -9,6 +9,11 @@ #ifndef BOTAN_ASIO_STREAM_CORE_H_ #define BOTAN_ASIO_STREAM_CORE_H_ +#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) + +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <botan/internal/asio_includes.h> #include <botan/tls_callbacks.h> #include <mutex> @@ -116,4 +121,6 @@ struct StreamCore : public Botan::TLS::Callbacks } // namespace Botan -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO +#endif // BOTAN_ASIO_STREAM_CORE_H_ diff --git a/src/tests/unit_asio_stream.cpp b/src/tests/unit_asio_stream.cpp index 1abc3b88d..3e86c71b5 100644 --- a/src/tests/unit_asio_stream.cpp +++ b/src/tests/unit_asio_stream.cpp @@ -10,6 +10,9 @@ #if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) +#include <boost/version.hpp> +#if BOOST_VERSION > 106600 + #include <botan/asio_stream.h> #include <botan/tls_callbacks.h> @@ -571,4 +574,5 @@ BOTAN_REGISTER_TEST("asio_stream", Asio_Stream_Tests); } // namespace Botan_Tests -#endif +#endif // BOOST_VERSION +#endif // BOTAN_HAS_TLS && BOTAN_HAS_BOOST_ASIO |