Commit graph

233 commits

Author SHA1 Message Date
Anton Ryzhov
7c03cc622c Thread counting fix 2014-01-21 19:28:17 +04:00
Lance Stout
4ae6d44efc Allow setting custom cipher suites in Py2.7+ 2014-01-13 10:14:10 -08:00
Lance Stout
df9ad82336 Undo event name fix, due to breakage in Py2.x 2013-12-22 01:10:19 -08:00
Florent Le Coz
820d07f309 Use strings for ElementTree.iterparse events names
Because if cElementTree is not available on the system,
ElementTree is used instead, and that version doesn't accept
bytes, resulting in an exception. See
http://bugs.python.org/issue9257#msg152864
2013-12-19 11:47:31 +01:00
Lance Stout
b8b2f37e7b Make the ssl version log usable 2013-09-17 16:37:52 -07:00
Anton Ryzhov
f12c241dca Blocking queue get 2013-07-01 10:30:43 +04:00
Lance Stout
669e708b70 Fix import error 2013-06-23 18:24:35 -07:00
Lance Stout
37a8043202 Merge pull request #244 from anton-ryzhov/speedup
Speedup main threads loops
2013-06-20 09:21:38 -07:00
Anton Ryzhov
805f1c0e39 Use timeout constants instead of magic numbers in scheduler and event loop
Set default wait timeout as max() of previous values
2013-06-20 18:30:07 +04:00
Anton Ryzhov
1776e2edcc Skip EINTR errors on raw sockets 2013-06-20 18:29:53 +04:00
Lance Stout
8ec18bdb2c Carry scheduled kwargs all the way 2013-04-23 11:09:04 -07:00
Lance Stout
7ac75de19d Make XMLMasks match properly for components. 2013-04-01 20:57:16 -07:00
Anton Ryzhov
020197718f Event index documentation updated 2013-03-28 22:09:33 +04:00
Anton Ryzhov
a0c77c04a5 XMLStream proxy_error event duplicated with connection_failed
SASL `no_auth` event duplicated with `failed_auth`
2013-03-28 22:09:33 +04:00
Anton Ryzhov
01356d23e5 Log events triggering 2013-03-28 20:44:37 +04:00
Anton Ryzhov
d9906756cf Don't use internally deprecated methods 2013-02-22 01:48:03 +04:00
Lance Stout
ce977a7809 Don't reset exponential backoff delay until a stream has been confirmed. 2013-01-11 17:18:58 -08:00
Lance Stout
8b29900be4 Fix some Python3 compatibility issues. 2012-12-14 09:37:29 -08:00
Lance Stout
e2e8c4b5dc Remove unneeded ssl_support checks. 2012-10-10 11:42:24 -07:00
Lance Stout
098714b3c4 Unclobber connected event handler names.
Fixes issue #199
2012-10-02 09:25:30 -07:00
Lance Stout
6c57bb0553 Simplify stringifying XML 2012-09-24 20:59:51 -07:00
Lance Stout
c2ae1ee891 Remove race condition when aborting while connecting/reconnecting. 2012-09-18 10:35:53 -07:00
Florian Fieber
e510875f64 Fix certificate expiration scheduler
timedelta.seconds does not store the total seconds of a time span.
Internally, seconds is the next smaller unit to days, hence
timedelta.seconds will never exceed (or reach) the number of seconds
in a day (60*60*24=86400)
2012-08-23 00:22:22 -07:00
Lance Stout
c6ac64ed2d Help prevent race condition dealing with auto_reconnect 2012-08-14 09:54:38 -07:00
Lance Stout
f7a710e55b Add abort() method to kill the session and stop all processing without properly closing the stream. 2012-08-10 14:12:05 -07:00
Lance Stout
4e12e228cb Fix tracking service name for DIGEST-MD5 2012-08-10 12:40:28 -07:00
Lance Stout
aebcf6ff82 Re-add connection delay after exhausting DNS records. 2012-08-07 01:38:15 -07:00
Lance Stout
8c2ece3bca Ensure self._der_cert exists even if no certs are used. 2012-08-04 21:37:46 -07:00
Lance Stout
80a90a6221 Prevent auto_reconnect interference when disconnecting. 2012-08-04 21:10:45 -07:00
Lance Stout
167d1ce97b Add fields for setting client cert and key for SASL EXTERNAL. 2012-07-30 19:15:10 -07:00
Lance Stout
422e77ae40 Don't wait to retry connection if out of DNS records. 2012-07-29 17:26:04 -07:00
Lance Stout
9a08dfc7d4 Add support for using CDATA for escaping.
CDATA escaping is disabled by default, but may be enabled by setting:

    self.use_cdata = True

Closes issue #114
2012-07-24 03:25:55 -07:00
Lance Stout
3e43b36a9d Standardize importing of queue class.
This will make it easier to enable gevent support.
2012-07-24 02:39:54 -07:00
Lance Stout
5df3839b7a Add method to remove a filter. 2012-07-10 01:37:23 -07:00
Jay Farrimond
88b5e60807 only log cert errors if not handled by user 2012-07-05 13:38:26 -07:00
Lance Stout
2a78570d65 Fix setting IPv6 default configuration option. 2012-06-20 22:21:34 -07:00
Lance Stout
e86444e5fb Make the use of IPv6 configurable.
Set self.use_ipv6 = False before connecting.

Fixes issue #175
2012-06-20 19:39:24 -07:00
Lance Stout
d92aa05b5c PEP8 formatting updates. 2012-06-19 01:29:48 -07:00
Lance Stout
181aea737d Add initial support for xml:lang for streams and stanza plugins.
Remaining items are suitable default actions for language supporting
interfaces.
2012-06-18 22:00:33 -07:00
Lance Stout
a08c2161a7 Ensure that ssl_invalid_cert returns PEM formatted certifcate data. 2012-06-15 15:29:53 -07:00
Lance Stout
c39ad7dfbb Prevent duplicate certificate expiration timers. 2012-06-13 09:13:33 -07:00
Lance Stout
6cfb5cb14c Add extra check for the cert in the expiration handler. 2012-06-09 11:01:45 -07:00
Lance Stout
4b37a4706f Fix SSL handshake handling when not using legacy SSL.
Fixes issue #172
2012-06-09 11:01:11 -07:00
Lance Stout
7b1564947d Ensure that all SSL cert error handling is overridable using event handlers.
Relevant events:

    ssl_invalid_cert
    ssl_invalid_chain
    ssl_expired_cert
2012-06-09 11:00:55 -07:00
Lance Stout
98677fd602 Don't add cert expiration timer if no certs are being used. 2012-06-04 11:53:58 -07:00
Lance Stout
856a826eea Fix syntax error in line continuation. 2012-06-01 14:09:14 -07:00
Lance Stout
387ef513d6 Check that the session is still alive before sending data.
Fixes issue #168
2012-06-01 13:50:38 -07:00
Lance Stout
350a2b8bbc Preemptively mark threads as exited if calling disconnect(). 2012-05-31 22:04:45 -07:00
Lance Stout
c9093c9972 Handle not being able to connect using IPv6 if the host does not support it. 2012-05-27 16:33:21 -07:00
Lance Stout
f49311ef9e Add better certificate handling.
Certificate host names are now matched (using DNS, SRV, XMPPAddr, and
Common Name), along with expiration check.

Scheduled event to reset the stream once the server's cert expires.

Handle invalid cert trust chains gracefully now.
2012-05-22 03:56:06 -07:00