Commit Graph

408 Commits

Author SHA1 Message Date
Yann Leboulanger 48d4199237 [dwd] re-enable TLS. Fixes #4674 2009-01-17 12:43:13 +00:00
Yann Leboulanger 77b5c85f18 load certificates from /etc/ssl/certs too. Fixes #4633 2009-01-15 17:54:28 +00:00
Yann Leboulanger 9b2382cd0e [dwd] better way to encode using base64. Fixes #4568 2009-01-14 08:51:07 +00:00
Stephan Erb 541167aa3e Move IdleCommand from resolver.py to idlequeue.py 2009-01-11 17:54:41 +00:00
Stephan Erb 0f61260578 Use logic which idlequeue shall be used to idlequeue module. 2009-01-11 17:11:17 +00:00
Stephan Erb f8e6635edf Remove some (now) useless returns that where added because of a broken commit of mine... 2009-01-11 17:10:41 +00:00
tomk 2b0ef67c55 fixes #4657 - traceback on terminating stanza after BOSH init request 2009-01-11 15:12:28 +00:00
Stephan Erb 8a19e11bee Add some FIXME statements due to open questions. Improve a two default parameters. 2009-01-11 13:42:39 +00:00
js 6ede969f5f Fix missing returns, so we don't run into that assert. 2009-01-10 22:46:26 +00:00
Stephan Erb c8dc8cd758 Fix a potential traceback in onreceive() of NonBlockingTransport. A few more codingstandards 2009-01-10 16:44:11 +00:00
Stephan Erb bc3445881f Rename client.py to plugin.py, as all client logic has already been moved to client_nb.py
Introduce a get_instance factory method for all plugins and other xmpp related classes. This will help us to decouple plugs in order to make them testable.
2009-01-09 00:49:58 +00:00
Stephan Erb e00f871b26 Use hashlib module in favor of sha and md5. 2009-01-08 16:51:26 +00:00
Stephan Erb cca10e6d29 A few more coding standards and readability improvements in client_nb.py. 2009-01-08 16:30:27 +00:00
Stephan Erb 10449444dd Switch to SSL version 3 as the channel encryption protocol. As of http://docs.python.org/dev/library/ssl.html this is the maximally compatible SSL variant. 2009-01-08 16:14:26 +00:00
Stephan Erb ed3de38ce5 Revert r10931. Fixes #4632. See #2634 2009-01-03 16:34:58 +00:00
Stephan Erb 28112d6681 Fix indentation error. 2008-12-31 14:04:42 +00:00
Stephan Erb 8a76efb703 Proposed Fix. Make sure we read all data from our SSL socket wrappers and don't just rely on gobject.io_add_watch, select or poll.
This isn't really a clean solution, but the less intrusives fix that I can think of. Fixes #2634.
2008-12-31 14:01:53 +00:00
Stephan Erb b2a5b1046c Remove print. 2008-12-28 14:55:23 +00:00
Stephan Erb d8a2d8f447 Backport a few XMPPPY upstream changes.
* Use namespace instead of attrs={} for addChild
 * Unplug SASL module on auth failure (we currently disconnect so don't really need it)
2008-12-28 14:53:20 +00:00
Stephan Erb f83eb5ae95 Remove two more "from protocol import *". 2008-12-28 01:52:21 +00:00
Brendan Taylor e98a648908 added licence notice to common/xmpp/c14n.py 2008-12-28 01:39:39 +00:00
Stephan Erb 7c0b1e4ed0 Module documentation for c14n.py. 2008-12-28 01:32:34 +00:00
Stephan Erb 8b3833b443 Coding standards and documentation improvements in features_nb.py. Remove unused methods. 2008-12-28 01:29:33 +00:00
Stephan Erb d7091c74a4 Remove method that was implemented for old, blocking dispatcher but is now unused. 2008-12-28 00:01:48 +00:00
Stephan Erb aa9a85767f Move module documentation ontop, so that it will show up in epydoc correctly. 2008-12-27 12:36:28 +00:00
Stephan Erb 233848aec0 Random bits in xmpp. Cosmetic only. 2008-12-27 11:45:58 +00:00
Stephan Erb b7400724b7 Coding standards and documentation improvements in dispatcher_nb.py. Many open questions remain at my side. Please check FIXMEs. 2008-12-27 11:39:52 +00:00
Stephan Erb de73b76771 Coding standards and documentation improvements in auth_nb.py 2008-12-26 15:39:18 +00:00
Stephan Erb 7427399a2a More coding standards and documentation improvements in client_nb.py 2008-12-26 15:25:57 +00:00
Stephan Erb afbac3d3e6 Coding standards and documentation improvements in idlequeue.py.
Fix a potential bug of missing an alarm_callback. Separate public from internal API.
2008-12-26 13:24:37 +00:00
Stephan Erb 40d802284e Coding standards and documentation improvements in client_nb.py 2008-12-24 14:41:26 +00:00
Stephan Erb 5139e7c8d0 Add credits and remove outdated documentation from __init__.py 2008-12-24 14:28:17 +00:00
Stephan Erb 6999e1bbb6 Make three docstrings epydoc enabled. See http://epydoc.sourceforge.net/manual-docstring.html 2008-12-24 13:56:02 +00:00
Stephan Erb 59b0216898 Remove Jacob Lundqvist's xmpp/debug.py module. We have switched to builtin python logging. 2008-12-24 13:51:15 +00:00
Stephan Erb a8cfd83c3e Move GObjectIdleQueue from gajim.py to idlequeue.py 2008-12-24 13:44:23 +00:00
Stephan Erb 6b5e9ea7ce Documentation improvements in client.py 2008-12-24 13:25:57 +00:00
Stephan Erb 9ec00eda74 Document consturctor in proxy_connector.py 2008-12-24 11:41:09 +00:00
Stephan Erb 1e00674505 Coding standards and documentation improvements in tls_nb.py 2008-12-24 11:10:58 +00:00
Stephan Erb 5c02a907b4 Coding standards and documentation improvements in transports_nb.py 2008-12-24 11:10:38 +00:00
Yann Leboulanger 45f9366d58 do'nt try starttls if stream version < 1.0. Fixes #4600 2008-12-22 09:59:35 +00:00
Yann Leboulanger 08bb703640 fix GSSAPI authentication 2008-12-18 18:16:04 +00:00
Yann Leboulanger b317ffcdae merge BOSH branch to trunk 2008-12-15 21:06:08 +00:00
Yann Leboulanger 24bb239fdb prevent traceback when server doen't include a query in jabber:iq:roster reply. Fixes #4579 2008-12-15 15:32:59 +00:00
Yann Leboulanger e389e0b16b [thorstenp] remove whitespace at eol 2008-12-03 21:56:12 +00:00
Yann Leboulanger c271d1f15a fix bad indentation 2008-12-03 21:37:54 +00:00
Yann Leboulanger 3392c54dd0 [thorstenp] fix empty exception clauses 2008-12-03 21:37:05 +00:00
Yann Leboulanger f0dce41ab6 fix string exceptions 2008-12-03 21:35:07 +00:00
Yann Leboulanger 5eb402ba4b [thorsten] pfix exceptions not inheriting from exception 2008-12-03 21:26:34 +00:00
Yann Leboulanger 60ba33eb31 [thorstenp] fix possible undefined loop variables 2008-12-03 17:38:16 +00:00
Yann Leboulanger 31dc32eeb9 [thorstenp] fix redefined builtins 2008-12-03 17:16:04 +00:00
Yann Leboulanger c163e90b10 [thorstenp] fix unused variables 2008-12-02 15:53:23 +00:00
Yann Leboulanger 7701f29beb [thorstenp] fix undefined variables 2008-12-02 15:10:31 +00:00
Yann Leboulanger e2118de64c [thorstenp] remove useless import 2008-12-02 14:44:26 +00:00
Yann Leboulanger 983301d589 [thorstenp] convert some strings to comment 2008-12-02 14:09:18 +00:00
Yann Leboulanger 11deb3b933 [thorstenp] remove useless pass 2008-12-02 14:03:32 +00:00
Yann Leboulanger 20ff72c523 [thorstenp] fix statements 2008-12-02 14:02:45 +00:00
Yann Leboulanger 3e88fdf41e check session support instead of Esession support, and announce we support it. Fixes #4429 2008-11-30 18:53:02 +00:00
Yann Leboulanger 91cc491173 [Simo Sorce] fix GSSAPI to use FQDN. See #2465 2008-11-28 07:27:42 +00:00
Yann Leboulanger 4cf9d0d622 if a SASL mechanism fails, try the others before abording authentification 2008-11-26 12:45:05 +00:00
Yann Leboulanger c69b4e90b6 detect and handle incorrect stream start. Fixes #4499 2008-11-21 10:02:16 +00:00
Yann Leboulanger 2521ea6080 [thorstenp] enable buffering of expat. see #4457 2008-11-05 20:03:27 +00:00
Yann Leboulanger 4a06659912 try to connect to next type when connection is refused (server not listening on 5223) 2008-10-22 19:59:14 +00:00
Yann Leboulanger 7ca670a303 assign variable soon enough. 2008-10-22 18:13:43 +00:00
Yann Leboulanger 6fc5ffe276 fix non blocking connect. don't block when connect fails. Fixes #4366, #4107 2008-10-21 15:50:20 +00:00
Yann Leboulanger 06ab4a7b6d revert thorstenp patches for now. They introduce bugs. 2008-10-20 21:38:06 +00:00
Yann Leboulanger f801a50260 [thorstenp] fix unused variables 2008-10-20 21:17:48 +00:00
Yann Leboulanger dc5d7bcf7c [thorstenp] fix undefined variables 2008-10-20 18:05:33 +00:00
Yann Leboulanger c2c681e05c [thorstenp] remove useless import 2008-10-20 17:54:02 +00:00
Yann Leboulanger 86271b6e3c [thorstenp] string to comment 2008-10-20 15:30:52 +00:00
Yann Leboulanger c9f3c94bb3 [thorstenp] remove useless pass 2008-10-20 15:21:26 +00:00
Yann Leboulanger 464f62d580 [thorstenp] remove statements without effect 2008-10-20 15:20:51 +00:00
Yann Leboulanger 7055eec326 fix typo 2008-10-16 18:40:00 +00:00
Yann Leboulanger 44277d6c40 prevent traceback. Fixes #4319 2008-10-16 17:19:22 +00:00
Yann Leboulanger 158538b81c [thorstenp] rename some var to not hide builts-in functions (list -> list_, ...) 2008-10-11 10:22:04 +00:00
Yann Leboulanger fd54e68e6d [thorstenp] some fixes with type() -> isinstance() 2008-10-11 10:06:49 +00:00
Yann Leboulanger 992e90208e [thorstenp] use != instead of <> 2008-10-11 10:02:49 +00:00
Yann Leboulanger 196dd7e30a [thorstenp] use isinstance rather than type(x) == y. use sorted() 2008-10-11 09:59:52 +00:00
Yann Leboulanger 00543277e4 [thorstenp] replace ` with repr 2008-10-11 09:51:27 +00:00
Yann Leboulanger 73aee40542 [thorstenp] replace none equality test with identity test 2008-10-11 09:44:12 +00:00
Yann Leboulanger ed748fdda3 [thorstenp] replace list with tuple in for and if 2008-10-11 09:42:59 +00:00
Yann Leboulanger 567f1e17c1 [thorstenp] di not use emtpy except clauses 2008-10-11 09:37:13 +00:00
Yann Leboulanger 84e717c8df [thorstenp] use startswith and endswith instead of array indices on strings 2008-10-11 09:32:59 +00:00
Yann Leboulanger 9d7c80d522 [thorstenp] replace has_key by key in dict. Fixes #4392 2008-10-07 20:41:59 +00:00
Yann Leboulanger 32b583986f [Jelmer Vernooij] Kerberos (GSSAPI) SASL authentication mechanism added 2008-09-27 14:59:12 +00:00
Yann Leboulanger 3d46bf0b6e [dwd] fix reconnection when we get wrong XML with undeclared namespaces. Fixes #3083 2008-09-27 14:26:50 +00:00
Yann Leboulanger e236382f3d handle XEP-0203 (Delayed Delivery) and use it when forwarding unread messages via adhoc commands. Fixes #4347 2008-09-26 11:11:38 +00:00
Yann Leboulanger 3e2f9fcbec prevent affiliatio spoofing by checking namespace. Fixes #4323 2008-09-16 08:30:27 +00:00
tomk a7c36048b9 - renamed src/common/nslookup.py to resolver.py
- refactored resolver code and added asynchronous resolver based on patch by Damien Thebault[1]
  * Uses libasyncns-python[2]. If it's not available, old nslookup resolver is used)
  * works for SRV requests only at the moment

[1] https://www.lagaule.org/pipermail/gajim-devel/2008-July/000460.html
[2] https://code.launchpad.net/libasyncns-python
2008-08-31 23:40:06 +00:00
tomk acdf4ff143 improved disconnect handling, added comments, fixed minor bugs 2008-08-17 22:57:48 +00:00
tomk a76c173816 - improved SSL connections with BOSH - SSL over HTTP proxy is possible now,
Gajim will do HTTP CONNECT on proxy to reach the BOSH Conn manager and try
  to estabilish TLS (same as what firefox do when approaching HTTPS server via
  proxy)
- moved proxy-connecting code to xmpp/proxy_connectors.py
- debugged SOCKS5 proxy code
- tested with Tigase server
2008-08-14 21:48:43 +00:00
tomk 4504861084 fixed handling of SSL errors 2008-08-09 12:16:42 +00:00
tomk cbfa9d97df - TLS classes refactored - NonBlockingTLS is now plugged to NonBlockingTCP and
derived (was plugged to NonBlockingClient which made it unusable for BOSH)
- Fixed HTTP CONNECT proxy socket
- Implemented workaround for the bug with insecure-connection warning dialog
  (unfortunately, this is not over - I just forbid the transport to send
  BOSH empty bodies until auth module is plugged, which is wrong and will
  break if user will wait more than "inactivity" (usualy thirty) seconds
  before clicking the dialog.
  This workaround works with ejb and opf, and also breaks connection with
  both of them if delay is too long.
- Implemented basic TLS over BOSH. It works only with OPF and poorly.
2008-08-05 23:52:35 +00:00
Yann Leboulanger 673052f1b8 handle disconnection while insecure connetion dialog is opened. fixes #4138 2008-07-30 15:43:53 +00:00
js 8605cd3f38 For historical reasons, we have a tab width of 3. This is strange, but
we have that in all files. To at least lesser the confusion a bit, add
vim tags for that.
Additionally, fix wrong #! in a few files.
2008-07-29 19:49:31 +00:00
tomk 56e0ad7a96 basic proxy authentication for BOSH connections implemented 2008-07-28 18:53:00 +00:00
tomk af3f1a9dd4 - implemented BOSH key sequencing, acknowledgements
- improved HTTP persistent connections
- added alarm-unregister method to idlequeue
- extended proxy managing dialog for BOSH proxy
2008-07-26 22:42:40 +00:00
tomk a58618c843 persistent HTTP connections in BOSH roughly implemented, added hack for openfire incapability of after-SASL-stream-restart-response in BOSH, changed doubles quotes to single 2008-07-18 00:34:49 +00:00
js 3bd76e406a Partially fix #4098.
This is, however, only a half fix as this fixes that it fails when
there's None in waiting_descriptors[2], but actually, there never
should be None, so I have to investigate why there was none.

This patch is, however, correct and needed and the other queues also
have that check. It's just that I also need to fix the reason for
the None in the queue.
2008-07-15 23:23:31 +00:00
Brendan Taylor 814c9c118a XEP-0116 support discovery 2008-07-14 00:26:05 +00:00
tomk cecce21c53 added hack for Openfire that doesn\'t add xmlns to child iqs of sent body stanzas 2008-07-13 23:10:11 +00:00