Commit Graph

1359 Commits

Author SHA1 Message Date
Christopher Kohlhoff
cdae3dd6b4 Don't use auto_ptr. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
25b6042644 Use deregister_internal_descriptor in signal_set_service. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
38508353af Make epoll_reactor resistant to events with duplicate user data. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
3541ec2eb9 Don't free the reactor's per-descriptor state until after close. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
4d1b169964 Enable newer language features for recent MSVC versions. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
3b8a8d6636 is_continuation misplaced in reactive socket service. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
84572fb9be Use poll.h rather than sys/poll.h if possible. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
22d69e570d Fix MSVC Intellisense detection. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
3a2e196893 Disable __thread keyword extension for android+x86+clang. 2017-07-31 18:51:14 +10:00
Christopher Kohlhoff
e62ac5aa6b Merge asio 1.10.9 from 'develop' 2017-03-08 07:30:19 +11:00
Christopher Kohlhoff
7a79c157fc Revision history. 2017-03-08 07:28:09 +11:00
Christopher Kohlhoff
aff810b55d Regenerate documentation. 2017-03-08 07:10:56 +11:00
Christopher Kohlhoff
5aa758b54a Ignore new macro when generating documentation. 2017-03-08 07:10:48 +11:00
Christopher Kohlhoff
3a73a43f62 Version bump. 2017-03-08 06:49:35 +11:00
Christopher Kohlhoff
9bfe806fc1 Ensure winsock2.h is included before windows.h. 2017-03-05 23:00:10 +11:00
Christopher Kohlhoff
991f613b95 Eliminate new clang comma warning. 2017-03-05 22:59:39 +11:00
Christopher Kohlhoff
2b6230aef8 Make sure asio/ssl/error.hpp is self-contained. 2017-03-05 22:58:18 +11:00
Christopher Kohlhoff
fba6c4ccbd Add limited support for regular file descriptors.
The epoll_reactor now supports the use of regular file descriptors with
posix::stream_descriptor, provided the I/O operations on them never fail
with EAGAIN or EWOULDBLOCK. If the descriptor cannot be added to the
epoll set using epoll_ctl, and errno is EPERM (indicating an unsupported
descriptor type), then no error condition is raised. Instead, any
operation which would require a trip through the reactor will fail.
2017-03-05 22:56:48 +11:00
Christopher Kohlhoff
49aa5e1e6c In c++11 or later, use allocator_traits to rebind allocators. 2017-03-05 22:55:54 +11:00
Christopher Kohlhoff
8e835cccd1 Fix error when OpenSSL compression is disabled at compile time. 2017-03-05 22:54:28 +11:00
Christopher Kohlhoff
16e880c667 Update mingw mutex initialisation to match non-mingw version. 2017-03-05 22:53:59 +11:00
Christopher Kohlhoff
d76c1f0533 Make SSL/TLS version handling more consistent across OpenSSL versions.
This adds new enums context_base::tls, context_base::tls_client and
context_base::tls_server. These allow connections to use any supported
TLS version. (N.B. the deprecated version SSLv3 is explicitly disabled
if you use these values.)
2017-03-05 22:53:05 +11:00
Christopher Kohlhoff
9feee12ac2 Avoid double construction in converting move-constructors. 2017-03-05 22:52:07 +11:00
Christopher Kohlhoff
4645a7c351 Fix compilation with OpenSSL 1.1 API
With OPENSSL_API_COMPAT=0x10100000L, SSL_library_init, SSL_load_error_strings, and OpenSSL_add_all_algorithms are removed.
With OPENSSL_API_COMPAT=0x10000000L, these are function-style macros mapping to OPENSSL_init_ssl, which is called automatically anyway.

References:
https://www.openssl.org/docs/man1.1.0/ssl/OPENSSL_init_ssl.html
https://www.openssl.org/docs/man1.1.0/crypto/OPENSSL_init_crypto.html

(from Marcel Raad)
2017-03-05 22:50:36 +11:00
Christopher Kohlhoff
fdec9d1d8f Suppress some spurious unused variable warnings. 2017-03-05 22:49:54 +11:00
Christopher Kohlhoff
6c19ff7482 Include socket_types.hpp before OpenSSL headers. 2017-03-05 22:48:48 +11:00
Christopher Kohlhoff
4808f72a1f Re-enable building against LibreSSL. 2017-03-05 22:47:57 +11:00
Christopher Kohlhoff
a8cea6a722 Implement fenced_block using std::atomic_thread_fence, when available. 2017-03-05 22:46:59 +11:00
Christopher Kohlhoff
dd18e955fa Add workaround for broken getaddrinfo in Apple's NAT64 environment. 2017-03-05 22:45:50 +11:00
Christopher Kohlhoff
0a852879f5 Fix exception safety issue in hash_map. 2017-03-05 22:45:09 +11:00
Christopher Kohlhoff
f7fa336c91 Update copyright notices. 2017-03-05 22:43:47 +11:00
Rene Rivera
d6d2c452f5 Switch to standalone docs for release.
This hopefully addresses formatting issues.
2017-01-21 08:05:38 -06:00
Rene Rivera
4fcaabffeb Add, and update, documentation build targets. 2016-10-10 11:39:47 -05:00
Rene Rivera
6ef8c1566c Add, and update, documentation build targets. 2016-10-07 23:03:40 -05:00
Christopher Kohlhoff
f2ed03374d Merge asio 1.10.8 from 'develop' 2016-09-19 07:59:46 +10:00
Christopher Kohlhoff
a1fb7b0c10 Version bump. 2016-09-19 07:37:14 +10:00
Christopher Kohlhoff
350f94e722 Revision history. 2016-09-19 07:33:03 +10:00
Christopher Kohlhoff
3ed131266c Regenerate documentation. 2016-09-16 08:27:01 +10:00
Christopher Kohlhoff
c1acb8a57b Add workaround for move-detection issue on MSVC 2015 Update 2. 2016-09-16 08:26:04 +10:00
Christopher Kohlhoff
603ebfb5e1 Call SSL_COMP_free_compression_methods() on ssl cleanup.
This call is needed for OpenSSL >=1.0.2 and <1.1.0.
2016-09-16 08:20:51 +10:00
Christopher Kohlhoff
42e7869f41 Fix allocator usage to compile with g++ 6. 2016-09-11 12:12:39 +10:00
Christopher Kohlhoff
3d71bdaf23 Use new TLS methods on OpenSSL 1.1.0. 2016-09-11 12:12:39 +10:00
Christopher Kohlhoff
8ea3165df9 Backward compatibility for code using OpenSSL < 1.1.0.
Some application code using asio::ssl::stream<> explicitly tests for the
SSL_R_SHORT_READ error. For compatibility, when using older versions of
OpenSSL we will define the ssl::error::stream_truncated to use this
value.
2016-09-11 12:12:39 +10:00
Christopher Kohlhoff
864ca38b6d Terminate loop if connect condition returns an end iterator. 2016-09-11 12:12:39 +10:00
Christopher Kohlhoff
54c9424b5a Enable getaddrinfo by default on Apple platforms.
The getaddrinfo function is now used by default unless Mac OS X 10.4 or
earlier is detected. Its use may also be explicitly disabled by defining
ASIO_DISABLE_GETADDRINFO.
2016-09-11 12:12:39 +10:00
Christopher Kohlhoff
370363b33f Fix errors when OPENSSL_NO_DEPRECATED is defined. 2016-09-11 12:01:12 +10:00
Christopher Kohlhoff
a50a350310 Only apply firewall workaround when getsockname outputs INADDR_ANY. 2016-09-11 11:59:19 +10:00
Christopher Kohlhoff
812cfa7a5c Add compatibility with OpenSSL 1.1
- SSLv2 has been completely removed from OpenSSL, even without OPENSSL_NO_SSL2
- there is a new threading API without locking callbacks
- struct SSL_CTX has been made opaque and must be used via accessor functions
- some cleanup functions have been removed

(from Marcel Raad <raad@teamviewer.com>)
2016-09-11 11:57:28 +10:00
Christopher Kohlhoff
424ad6b736 BoringSSL does not provide CONF_modules_unload. 2016-09-11 11:37:29 +10:00
Christopher Kohlhoff
84e840390b Add new error category and constant for ssl::error::stream_truncated.
This error replaces uses of SSL_R_SHORT_READ, and indicates that the
SSL stream has been shut down abruptly. (I.e. the underlying socket
has been closed without performing an SSL-layer shutdown.)
2016-09-11 11:36:53 +10:00