| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
_feed_data_to_bufferred_proto() renamed to
_feed_data_to_buffered_proto() ("bufferred" => "buffered").
Typo spotted by Nathaniel J. Smith.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cancellation of an overlapped WSARecv() has a race condition
which causes data loss because of the current implementation of
proactor in asyncio.
No longer cancel overlapped WSARecv() in _ProactorReadPipeTransport
to work around the race condition.
Remove the optimized recv_into() implementation to get simple
implementation of pause_reading() using the single _pending_data
attribute.
Move _feed_data_to_bufferred_proto() to protocols.py.
Remove set_protocol() method which became useless.
|
|
|
| |
In addition to that, mark SSLTransport as "closed" in its "abort()" method to prevent bogus warnings.
|
|
|
|
|
|
|
| |
* Fix AttributeError (not all SSL exceptions have 'errno' attribute)
* Increase default handshake timeout from 10 to 60 seconds
* Make sure start_tls can be cancelled correctly
* Make sure any error in SSLProtocol gets propagated (instead of just being logged)
|
|
|
|
| |
(#7194)
|
|
|
|
|
|
| |
Fix a race condition in SSLProtocol.connection_made() of
asyncio.sslproto: start immediately the handshake instead of using
call_soon(). Previously, data_received() could be called before the
handshake started, causing the handshake to hang or fail.
|
|
|
|
|
|
|
|
|
|
|
| |
In this commit:
* Support BufferedProtocol in set_protocol() and start_tls()
* Fix proactor to cancel readers reliably
* Update tests to be compatible with OpenSSL 1.1.1
* Clarify BufferedProtocol docs
* Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving
* Rewrite test_start_tls_server_1
|
|
|
|
| |
* Skip write()/data_received() if sslpipe is destroyed
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bpo-31399: Let OpenSSL verify hostname and IP
The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and
X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses.
* Remove match_hostname calls
* Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host()
* Add documentation for OpenSSL 1.0.2 requirement
* Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform.
* Add hostname_checks_common_name
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
* Make ssh_handshake_timeout None by default.
* Raise ValueError if ssl_handshake_timeout is used without ssl.
* Raise ValueError if ssl_handshake_timeout is not positive.
|
|
|
|
| |
10 seconds by default.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Drop legacy SSL transport
* Drop unused import
* Fix Windows tests
* Drop never executed on Python 3.4+ code
|
| |
|
|
|
|
|
| |
with certain servers (#409)" (#2111)
This reverts commit a608d2d5a7f1aabe9bcbfc220135c5e126189390.
|
|
|
|
|
|
|
|
| |
certain servers (#409)
* asyncio SSL contexts leak sockets after calling close with certain servers
* cleanup _shutdown_timeout_handle on _fatal_error
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
completed.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #23749: With this change it's possible to implement starttls
as a separate package on PyPI, or even by copying/pasting a small
snipped of code in your project.
It's expected that we'll figure out the API design for starttls
during 3.6, so that we can add it in 3.7.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Patch by Richard Walker.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Issue #26509: In fatal error handlers, don't log ConnectionAbortedError which
occur on Windows.
|
|/
|
|
|
|
|
|
| |
Issue #26604:
* Add a new optional source parameter to _warnings.warn() and warnings.warn()
* Modify asyncore, asyncio and _pyio modules to set the source parameter when
logging a ResourceWarning warning
|
|
|
|
| |
See https://github.com/python/asyncio/pull/291 for details.
|
| |
|
|
|
|
|
|
| |
This info is required on Python 3.5 and newer to get specific information on
the SSL object, like getting the binary peer certificate (instead of getting
it as text).
|
| |
|
| |
|
|
|
|
| |
is not explicitly closed. Close also explicitly transports in test_sslproto.
|
|
|
|
|
|
|
| |
* Rephrase also the comment explaining why the waiter is not awaken immediatly.
* SSLProtocol.eof_received() doesn't instanciate ConnectionResetError exception
directly, it will be done by Future.set_exception(). The exception is not
used if the waiter was cancelled or if there is no waiter.
|
|
|
|
| |
Wake-up the waiter if it is not done yet.
|
|
|
|
|
|
|
|
|
|
| |
* Remove unused SSLProtocol._closing attribute
* test_sslproto: skip test if ssl module is missing
* Python issue #23208: Don't use the traceback of the current handle if we
already know the traceback of the source. The handle may be more revelant,
but having 3 tracebacks (handle, source, exception) becomes more difficult to
read. The handle may be preferred later but it requires more work to make
this choice.
|
| |
|
| |
|
|
|
|
|
|
| |
Don't call immediatly self._process_write_backlog() but schedule the call using
call_soon(). _on_handshake_complete() can be called indirectly from
_process_write_backlog(), and _process_write_backlog() is not reentrant.
|
|
|
|
|
|
|
| |
cancelled before setting its exception.
* Add unit tests for this case.
* Cleanup also sslproto.py
|
|
The new SSL implementation is based on the new ssl.MemoryBIO which is only
available on Python 3.5. On Python 3.4 and older, the legacy SSL implementation
(using SSL_write, SSL_read, etc.) is used. The proactor event loop only
supports the new implementation.
The new asyncio.sslproto module adds _SSLPipe, SSLProtocol and
_SSLProtocolTransport classes. _SSLPipe allows to "wrap" or "unwrap" a socket
(switch between cleartext and SSL/TLS).
Patch written by Antoine Pitrou. sslproto.py is based on gruvi/ssl.py of the
gruvi project written by Geert Jansen.
This change adds SSL support to ProactorEventLoop on Python 3.5 and newer!
It becomes also possible to implement STARTTTLS: switch a cleartext socket to
SSL.
|