diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-02-07 11:23:32 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-02-07 11:23:32 -0500 |
commit | 5f86a8e4ca87f169dc708b15b13a26c2bb514762 (patch) | |
tree | f312d8f95b314906b539ea44c963bf74e0b5b7c4 /src/third_party | |
parent | ad223ea38846ceac92d7b5356add62e23e985537 (diff) | |
download | mongo-5f86a8e4ca87f169dc708b15b13a26c2bb514762.tar.gz |
Revert "SERVER-22411 Add stub implementation of ASIO SChannel integration"
This reverts commit ad223ea38846ceac92d7b5356add62e23e985537.
Diffstat (limited to 'src/third_party')
19 files changed, 1 insertions, 506 deletions
diff --git a/src/third_party/SConscript b/src/third_party/SConscript index 4df058c7a6f..dc1d682d5a9 100644 --- a/src/third_party/SConscript +++ b/src/third_party/SConscript @@ -394,7 +394,6 @@ if use_system_version_of_library("asio"): else: asioEnv = env.Clone() asioEnv.InjectThirdPartyIncludePaths(libraries=['asio']) - asioEnv.InjectMongoIncludePaths() asioEnv.SConscript('asio-master/SConscript', exports={ 'env' : asioEnv }) asioEnv = asioEnv.Clone( LIBDEPS_INTERFACE=[ diff --git a/src/third_party/asio-master/asio/include/asio/ssl.hpp b/src/third_party/asio-master/asio/include/asio/ssl.hpp index 166f85e97bc..e49eb17e751 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl.hpp @@ -18,9 +18,7 @@ #include "asio/ssl/context.hpp" #include "asio/ssl/context_base.hpp" #include "asio/ssl/error.hpp" -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/rfc2818_verification.hpp" -#endif #include "asio/ssl/stream.hpp" #include "asio/ssl/stream_base.hpp" #include "asio/ssl/verify_context.hpp" diff --git a/src/third_party/asio-master/asio/include/asio/ssl/context.hpp b/src/third_party/asio-master/asio/include/asio/ssl/context.hpp index 93d683e6e54..1af04990ea1 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/context.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/context.hpp @@ -21,23 +21,14 @@ #include "asio/buffer.hpp" #include "asio/io_context.hpp" #include "asio/ssl/context_base.hpp" - -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/detail/openssl_types.hpp" #include "asio/ssl/detail/openssl_init.hpp" #include "asio/ssl/detail/password_callback.hpp" #include "asio/ssl/detail/verify_callback.hpp" #include "asio/ssl/verify_mode.hpp" -#endif #include "asio/detail/push_options.hpp" -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS - -#include "asio/ssl/context_schannel.hpp" - -#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL - namespace asio { namespace ssl { @@ -758,10 +749,6 @@ private: } // namespace ssl } // namespace asio -#else -#error "Unknown SSL Provider" -#endif - #include "asio/detail/pop_options.hpp" #include "asio/ssl/impl/context.hpp" diff --git a/src/third_party/asio-master/asio/include/asio/ssl/context_base.hpp b/src/third_party/asio-master/asio/include/asio/ssl/context_base.hpp index 3ee7770eb1e..1fea9799c2f 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/context_base.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/context_base.hpp @@ -16,10 +16,7 @@ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include "asio/detail/config.hpp" - -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/detail/openssl_types.hpp" -#endif #include "asio/detail/push_options.hpp" @@ -101,7 +98,6 @@ public: /// Bitmask type for SSL options. typedef long options; -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #if defined(GENERATING_DOCUMENTATION) /// Implement various bug workarounds. static const long default_workarounds = implementation_defined; @@ -148,7 +144,6 @@ public: ASIO_STATIC_CONSTANT(long, no_compression = 0x20000L); # endif // defined(SSL_OP_NO_COMPRESSION) #endif -#endif /// File format types. enum file_format @@ -160,7 +155,6 @@ public: pem }; -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #if !defined(GENERATING_DOCUMENTATION) // The following types and constants are preserved for backward compatibility. // New programs should use the equivalents of the same names that are defined @@ -172,7 +166,6 @@ public: verify_fail_if_no_peer_cert = SSL_VERIFY_FAIL_IF_NO_PEER_CERT); ASIO_STATIC_CONSTANT(int, verify_client_once = SSL_VERIFY_CLIENT_ONCE); #endif -#endif /// Purpose of PEM password. enum password_purpose diff --git a/src/third_party/asio-master/asio/include/asio/ssl/context_schannel.hpp b/src/third_party/asio-master/asio/include/asio/ssl/context_schannel.hpp deleted file mode 100644 index 4d526422a9f..00000000000 --- a/src/third_party/asio-master/asio/include/asio/ssl/context_schannel.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (C) 2018 MongoDB Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * As a special exception, the copyright holders give permission to link the - * code of portions of this program with the OpenSSL library under certain - * conditions as described in each individual source file and distribute - * linked combinations including the program with the OpenSSL library. You - * must comply with the GNU Affero General Public License in all respects - * for all of the code used other than as permitted herein. If you modify - * file(s) with this exception, you may extend this exception to your - * version of the file(s), but you are not obligated to do so. If you do not - * wish to do so, delete this exception statement from your version. If you - * delete this exception statement from all source files in the program, - * then also delete it in the license file. - */ - -#if MONGO_CONFIG_SSL_PROVIDER != SSL_PROVIDER_WINDOWS -#error Only include this file in the SChannel Implementation -#endif - -namespace asio { -namespace ssl { - -class context - : public context_base, - private noncopyable -{ -public: - /// The native handle type of the SSL context. - typedef SCHANNEL_CRED* native_handle_type; - - /// Constructor. - ASIO_DECL explicit context(method m); - -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - /// Move-construct a context from another. - /** - * This constructor moves an SSL context from one object to another. - * - * @param other The other context object from which the move will occur. - * - * @note Following the move, the following operations only are valid for the - * moved-from object: - * @li Destruction. - * @li As a target for move-assignment. - */ - ASIO_DECL context(context&& other); - - /// Move-assign a context from another. - /** - * This assignment operator moves an SSL context from one object to another. - * - * @param other The other context object from which the move will occur. - * - * @note Following the move, the following operations only are valid for the - * moved-from object: - * @li Destruction. - * @li As a target for move-assignment. - */ - ASIO_DECL context& operator=(context&& other); -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - - /// Destructor. - ASIO_DECL ~context(); - - /// Get the underlying implementation in the native type. - /** - * This function may be used to obtain the underlying implementation of the - * context. This is intended to allow access to context functionality that is - * not otherwise provided. - */ - ASIO_DECL native_handle_type native_handle(); - -private: - // The underlying native implementation. - native_handle_type handle_; -}; - -} // namespace ssl -} // namespace asio diff --git a/src/third_party/asio-master/asio/include/asio/ssl/detail/engine.hpp b/src/third_party/asio-master/asio/include/asio/ssl/detail/engine.hpp index 40fdfeeac2b..061a50dd2ac 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/detail/engine.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/detail/engine.hpp @@ -19,22 +19,13 @@ #include "asio/buffer.hpp" #include "asio/detail/static_mutex.hpp" -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/detail/openssl_types.hpp" -#endif #include "asio/ssl/detail/verify_callback.hpp" #include "asio/ssl/stream_base.hpp" #include "asio/ssl/verify_mode.hpp" #include "asio/detail/push_options.hpp" - -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS - -#include "asio/ssl/detail/engine_schannel.hpp" - -#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL - namespace asio { namespace ssl { namespace detail { @@ -159,9 +150,6 @@ private: } // namespace detail } // namespace ssl } // namespace asio -#else -#error "Unknown SSL Provider" -#endif #include "asio/detail/pop_options.hpp" diff --git a/src/third_party/asio-master/asio/include/asio/ssl/detail/engine_schannel.hpp b/src/third_party/asio-master/asio/include/asio/ssl/detail/engine_schannel.hpp deleted file mode 100644 index bb7c19e4239..00000000000 --- a/src/third_party/asio-master/asio/include/asio/ssl/detail/engine_schannel.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (C) 2018 MongoDB Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * As a special exception, the copyright holders give permission to link the - * code of portions of this program with the OpenSSL library under certain - * conditions as described in each individual source file and distribute - * linked combinations including the program with the OpenSSL library. You - * must comply with the GNU Affero General Public License in all respects - * for all of the code used other than as permitted herein. If you modify - * file(s) with this exception, you may extend this exception to your - * version of the file(s), but you are not obligated to do so. If you do not - * wish to do so, delete this exception statement from your version. If you - * delete this exception statement from all source files in the program, - * then also delete it in the license file. - */ - -#if MONGO_CONFIG_SSL_PROVIDER != SSL_PROVIDER_WINDOWS -#error Only include this file in the SChannel Implementation -#endif - -namespace asio { -namespace ssl { -namespace detail { - -class engine -{ -public: - enum want - { - // Returned by functions to indicate that the engine wants input. The input - // buffer should be updated to point to the data. The engine then needs to - // be called again to retry the operation. - want_input_and_retry = -2, - - // Returned by functions to indicate that the engine wants to write output. - // The output buffer points to the data to be written. The engine then - // needs to be called again to retry the operation. - want_output_and_retry = -1, - - // Returned by functions to indicate that the engine doesn't need input or - // output. - want_nothing = 0, - - // Returned by functions to indicate that the engine wants to write output. - // The output buffer points to the data to be written. After that the - // operation is complete, and the engine does not need to be called again. - want_output = 1 - }; - - // Construct a new engine for the specified context. - ASIO_DECL explicit engine(SCHANNEL_CRED* context); - - // Destructor. - ASIO_DECL ~engine(); - - // Get the underlying implementation in the native type. - ASIO_DECL PCtxtHandle native_handle(); - - // Set the peer verification mode. - ASIO_DECL asio::error_code set_verify_mode( - verify_mode v, asio::error_code& ec); - - // Set the peer verification depth. - ASIO_DECL asio::error_code set_verify_depth( - int depth, asio::error_code& ec); - - // Set a peer certificate verification callback. - ASIO_DECL asio::error_code set_verify_callback( - verify_callback_base* callback, asio::error_code& ec); - - // Perform an SSL handshake using either SSL_connect (client-side) or - // SSL_accept (server-side). - ASIO_DECL want handshake( - stream_base::handshake_type type, asio::error_code& ec); - - // Perform a graceful shutdown of the SSL session. - ASIO_DECL want shutdown(asio::error_code& ec); - - // Write bytes to the SSL session. - ASIO_DECL want write(const asio::const_buffer& data, - asio::error_code& ec, std::size_t& bytes_transferred); - - // Read bytes from the SSL session. - ASIO_DECL want read(const asio::mutable_buffer& data, - asio::error_code& ec, std::size_t& bytes_transferred); - - // Get output data to be written to the transport. - ASIO_DECL asio::mutable_buffer get_output( - const asio::mutable_buffer& data); - - // Put input data that was read from the transport. - ASIO_DECL asio::const_buffer put_input( - const asio::const_buffer& data); - - // Map an error::eof code returned by the underlying transport according to - // the type and state of the SSL session. Returns a const reference to the - // error code object, suitable for passing to a completion handler. - ASIO_DECL const asio::error_code& map_error_code( - asio::error_code& ec) const; - -private: - // Disallow copying and assignment. - engine(const engine&); - engine& operator=(const engine&); - -private: - -}; - -} // namespace detail -} // namespace ssl -} // namespace asio diff --git a/src/third_party/asio-master/asio/include/asio/ssl/detail/impl/engine.ipp b/src/third_party/asio-master/asio/include/asio/ssl/detail/impl/engine.ipp index 261c8aa4732..345461b13e0 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/detail/impl/engine.ipp +++ b/src/third_party/asio-master/asio/include/asio/ssl/detail/impl/engine.ipp @@ -25,12 +25,6 @@ #include "asio/detail/push_options.hpp" -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS - -#include "asio/ssl/detail/impl/engine_schannel.ipp" - -#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL - namespace asio { namespace ssl { namespace detail { @@ -323,11 +317,6 @@ int engine::do_write(void* data, std::size_t length) } // namespace ssl } // namespace asio -#else -#error "Unknown SSL Provider" -#endif - - #include "asio/detail/pop_options.hpp" #endif // ASIO_SSL_DETAIL_IMPL_ENGINE_IPP diff --git a/src/third_party/asio-master/asio/include/asio/ssl/detail/impl/engine_schannel.ipp b/src/third_party/asio-master/asio/include/asio/ssl/detail/impl/engine_schannel.ipp deleted file mode 100644 index 6ffb011b0e4..00000000000 --- a/src/third_party/asio-master/asio/include/asio/ssl/detail/impl/engine_schannel.ipp +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright (C) 2018 MongoDB Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * As a special exception, the copyright holders give permission to link the - * code of portions of this program with the OpenSSL library under certain - * conditions as described in each individual source file and distribute - * linked combinations including the program with the OpenSSL library. You - * must comply with the GNU Affero General Public License in all respects - * for all of the code used other than as permitted herein. If you modify - * file(s) with this exception, you may extend this exception to your - * version of the file(s), but you are not obligated to do so. If you do not - * wish to do so, delete this exception statement from your version. If you - * delete this exception statement from all source files in the program, - * then also delete it in the license file. - */ - -#if MONGO_CONFIG_SSL_PROVIDER != SSL_PROVIDER_WINDOWS -#error Only include this file in the SChannel Implementation -#endif - -namespace asio { -namespace ssl { -namespace detail { - -engine::engine(SCHANNEL_CRED* context) -{ -} - -engine::~engine() -{ -} - -PCtxtHandle engine::native_handle() -{ - return nullptr; -} - -asio::error_code engine::set_verify_mode( - verify_mode v, asio::error_code& ec) -{ - ec = asio::error_code(); - return ec; -} - -asio::error_code engine::set_verify_depth( - int depth, asio::error_code& ec) -{ - ec = asio::error_code(); - return ec; -} - -asio::error_code engine::set_verify_callback( - verify_callback_base* callback, asio::error_code& ec) -{ - ec = asio::error_code(); - return ec; -} - - -engine::want engine::handshake( - stream_base::handshake_type type, asio::error_code& ec) -{ - return want::want_nothing; -} - -engine::want engine::shutdown(asio::error_code& ec) -{ - return want::want_nothing; -} - -engine::want engine::write(const asio::const_buffer& data, - asio::error_code& ec, std::size_t& bytes_transferred) -{ - return want::want_nothing; -} - -engine::want engine::read(const asio::mutable_buffer& data, - asio::error_code& ec, std::size_t& bytes_transferred) -{ - return want::want_nothing; -} - -asio::mutable_buffer engine::get_output( - const asio::mutable_buffer& data) -{ - return asio::mutable_buffer(nullptr, 0); -} - -asio::const_buffer engine::put_input( - const asio::const_buffer& data) -{ - return asio::const_buffer(nullptr, 0); -} - -const asio::error_code& engine::map_error_code( - asio::error_code& ec) const -{ - return ec; -} - -} // namespace detail -} // namespace ssl -} // namespace asio diff --git a/src/third_party/asio-master/asio/include/asio/ssl/detail/stream_core.hpp b/src/third_party/asio-master/asio/include/asio/ssl/detail/stream_core.hpp index 157fd5a9d7c..86cbfc06656 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/detail/stream_core.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/detail/stream_core.hpp @@ -37,13 +37,7 @@ struct stream_core // sufficient to hold the largest possible TLS record. enum { max_tls_record_size = 17 * 1024 }; -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS - stream_core(SCHANNEL_CRED* context, asio::io_context& io_context) -#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL stream_core(SSL_CTX* context, asio::io_context& io_context) -#else -#error "Unknown SSL Provider" -#endif : engine_(context), pending_read_(io_context), pending_write_(io_context), diff --git a/src/third_party/asio-master/asio/include/asio/ssl/error.hpp b/src/third_party/asio-master/asio/include/asio/ssl/error.hpp index d1c1d110afd..6a0d2213e14 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/error.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/error.hpp @@ -17,9 +17,7 @@ #include "asio/detail/config.hpp" #include "asio/error_code.hpp" -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/detail/openssl_types.hpp" -#endif #include "asio/detail/push_options.hpp" @@ -47,7 +45,7 @@ enum stream_errors #if defined(GENERATING_DOCUMENTATION) /// The underlying stream closed before the ssl stream gracefully shut down. stream_truncated -#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL) && MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL +#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL) stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ) #else stream_truncated = 1 diff --git a/src/third_party/asio-master/asio/include/asio/ssl/impl/context.ipp b/src/third_party/asio-master/asio/include/asio/ssl/impl/context.ipp index d5b552c5970..45e203fb5d5 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/impl/context.ipp +++ b/src/third_party/asio-master/asio/include/asio/ssl/impl/context.ipp @@ -26,12 +26,6 @@ #include "asio/detail/push_options.hpp" -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS - -#include "asio/ssl/impl/context_schannel.ipp" - -#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL - namespace asio { namespace ssl { @@ -1156,9 +1150,6 @@ BIO* context::make_buffer_bio(const const_buffer& b) } // namespace ssl } // namespace asio -#else -#error "Unknown SSL Provider" -#endif #include "asio/detail/pop_options.hpp" diff --git a/src/third_party/asio-master/asio/include/asio/ssl/impl/context_schannel.ipp b/src/third_party/asio-master/asio/include/asio/ssl/impl/context_schannel.ipp deleted file mode 100644 index 5b010eb71bc..00000000000 --- a/src/third_party/asio-master/asio/include/asio/ssl/impl/context_schannel.ipp +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (C) 2018 MongoDB Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * As a special exception, the copyright holders give permission to link the - * code of portions of this program with the OpenSSL library under certain - * conditions as described in each individual source file and distribute - * linked combinations including the program with the OpenSSL library. You - * must comply with the GNU Affero General Public License in all respects - * for all of the code used other than as permitted herein. If you modify - * file(s) with this exception, you may extend this exception to your - * version of the file(s), but you are not obligated to do so. If you do not - * wish to do so, delete this exception statement from your version. If you - * delete this exception statement from all source files in the program, - * then also delete it in the license file. - */ - -#if MONGO_CONFIG_SSL_PROVIDER != SSL_PROVIDER_WINDOWS -#error Only include this file in the SChannel Implementation -#endif - -namespace asio { -namespace ssl { - - -context::context(context::method m) - : handle_(0) -{ -} - -#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) -context::context(context&& other) -{ - handle_ = other.handle_; - other.handle_ = 0; -} - -context& context::operator=(context&& other) -{ - context tmp(ASIO_MOVE_CAST(context)(*this)); - handle_ = other.handle_; - other.handle_ = 0; - return *this; -} -#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) - -context::~context() -{ -} - -context::native_handle_type context::native_handle() -{ - return handle_; -} - -} // namespace ssl -} // namespace asio diff --git a/src/third_party/asio-master/asio/include/asio/ssl/impl/error.ipp b/src/third_party/asio-master/asio/include/asio/ssl/impl/error.ipp index 0d8ab9e6b08..42caeb7aa4c 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/impl/error.ipp +++ b/src/third_party/asio-master/asio/include/asio/ssl/impl/error.ipp @@ -17,10 +17,7 @@ #include "asio/detail/config.hpp" #include "asio/ssl/error.hpp" - -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/detail/openssl_init.hpp" -#endif #include "asio/detail/push_options.hpp" @@ -36,22 +33,11 @@ public: return "asio.ssl"; } -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS - std::string message(int value) const - { - // TODO: call FormatMessage - ASIO_ASSERT(false); - return "asio.ssl error"; - } -#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL std::string message(int value) const { const char* s = ::ERR_reason_error_string(value); return s ? s : "asio.ssl error"; } -#else -#error "Unknown SSL Provider" -#endif }; } // namespace detail diff --git a/src/third_party/asio-master/asio/include/asio/ssl/impl/src.hpp b/src/third_party/asio-master/asio/include/asio/ssl/impl/src.hpp index 9790a7a329c..39c85e34b2b 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/impl/src.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/impl/src.hpp @@ -22,10 +22,7 @@ #include "asio/ssl/impl/context.ipp" #include "asio/ssl/impl/error.ipp" #include "asio/ssl/detail/impl/engine.ipp" - -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/detail/impl/openssl_init.ipp" #include "asio/ssl/impl/rfc2818_verification.ipp" -#endif #endif // ASIO_SSL_IMPL_SRC_HPP diff --git a/src/third_party/asio-master/asio/include/asio/ssl/stream.hpp b/src/third_party/asio-master/asio/include/asio/ssl/stream.hpp index 2a0438069b1..0dbffe2777b 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/stream.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/stream.hpp @@ -66,21 +66,13 @@ class stream : { public: /// The native handle type of the SSL stream. -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS - typedef PCtxtHandle native_handle_type; -#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL typedef SSL* native_handle_type; -#else -#error "Unknown SSL Provider" -#endif -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL /// Structure for use with deprecated impl_type. struct impl_struct { SSL* ssl; }; -#endif /// The type of the next layer. typedef typename remove_reference<Stream>::type next_layer_type; diff --git a/src/third_party/asio-master/asio/include/asio/ssl/verify_context.hpp b/src/third_party/asio-master/asio/include/asio/ssl/verify_context.hpp index ea22901e758..34f93531f9a 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/verify_context.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/verify_context.hpp @@ -18,9 +18,7 @@ #include "asio/detail/config.hpp" #include "asio/detail/noncopyable.hpp" -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/detail/openssl_types.hpp" -#endif #include "asio/detail/push_options.hpp" @@ -37,13 +35,7 @@ class verify_context { public: /// The native handle type of the verification context. -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL typedef X509_STORE_CTX* native_handle_type; -#elif MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_WINDOWS - typedef float native_handle_type; -#else -#error "Unknown SSL Provider" -#endif /// Constructor. explicit verify_context(native_handle_type handle) diff --git a/src/third_party/asio-master/asio/include/asio/ssl/verify_mode.hpp b/src/third_party/asio-master/asio/include/asio/ssl/verify_mode.hpp index 9e0e4e60a57..6c444cc89da 100644 --- a/src/third_party/asio-master/asio/include/asio/ssl/verify_mode.hpp +++ b/src/third_party/asio-master/asio/include/asio/ssl/verify_mode.hpp @@ -16,10 +16,7 @@ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include "asio/detail/config.hpp" - -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #include "asio/ssl/detail/openssl_types.hpp" -#endif #include "asio/detail/push_options.hpp" @@ -37,7 +34,6 @@ namespace ssl { */ typedef int verify_mode; -#if MONGO_CONFIG_SSL_PROVIDER == SSL_PROVIDER_OPENSSL #if defined(GENERATING_DOCUMENTATION) /// No verification. const int verify_none = implementation_defined; @@ -58,7 +54,6 @@ const int verify_peer = SSL_VERIFY_PEER; const int verify_fail_if_no_peer_cert = SSL_VERIFY_FAIL_IF_NO_PEER_CERT; const int verify_client_once = SSL_VERIFY_CLIENT_ONCE; #endif -#endif } // namespace ssl } // namespace asio diff --git a/src/third_party/asio-master/asio/src/asio_ssl.cpp b/src/third_party/asio-master/asio/src/asio_ssl.cpp index 65c96dc8eba..959c14a9fd0 100644 --- a/src/third_party/asio-master/asio/src/asio_ssl.cpp +++ b/src/third_party/asio-master/asio/src/asio_ssl.cpp @@ -8,9 +8,4 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -// MONGO HACK - include mongo headers to get Windows SChannel headers and ssl config defines. -#include "mongo/platform/basic.h" - -#include "mongo/config.h" - #include "asio/ssl/impl/src.hpp" |