Commit Graph

89 Commits

Author SHA1 Message Date
Christophe Romain 4a2005f7cc update copyright up to 2011 2011-02-14 13:47:22 +01:00
Badlop 2d0d46e296 Option to reject S2S connection if untrusted certificate (EJAB-464) 2011-01-11 16:38:33 +01:00
Badlop 41fc44e55f When TLS is required in s2s, add subelement to stream:features starttls 2011-01-11 16:38:30 +01:00
Pablo Polvorin 54557cb867 Send correct from/to attributes in s2s dialback response (EJAB-1363).
We were sending swapped from/to attributes when replying to db:verify requests.
Some servers don't mind about this, but others like prosody checks this and
rejects the verification, the s2s connection in that case couldn't be established.
2011-01-10 17:46:07 -03:00
Alexey Shchepin a40e9c2626 Remove version=1.0 from stream opening when TLS is not available (thanks to Karim Gemayel) 2010-12-23 16:28:35 +02:00
Andreas Köhler 7be6e33ea4 Correct domain_certfile tlsopts modifications for s2s connections (EJAB-1086)
* In ejabberd_s2s_out:wait_for_feature_request/2, the domain to use for
  looking up domain_certfile options is #state.myname and not
  #state.server

* If s2s_certfile is not specified, connect should still be part of the
  tls options used by ejabberd_s2s_out

* Add #state.server to ejabberd_s2s_in processes and store the to
  attribute in :wait_for_stream/2. Then use that server in
  :wait_for_feature_request/2 to change the tls options like in
  ejabberd_s2s_out.

Fixes EJAB-1086.
2010-11-26 00:13:36 +01:00
Andreas Köhler aaa69a8c36 Use LFrom and LTo consistently in ejabberd_s2s_in:stream_established/2 (EJAB-1342) 2010-11-17 12:56:18 +01:00
Badlop 82a8dc7b3a Cosmetic code changes to support emacs indentation 2010-10-07 17:38:18 +02:00
Badlop f8412d7c5d When using OTP R14, use public_key library instead of old ssl (EJAB-953) 2010-07-12 13:58:10 +02:00
Evgeniy Khramtsov 92ec42565e full support for XEP-0115 v1.5 (EJAB-1223) (EJAB-1189) 2010-05-10 16:00:30 +10:00
Badlop 1bcd481fdc Update year of ProcessOne copyright from 2009 to 2010 (EJAB-1159)
SVN Revision: 2892
2010-01-12 16:15:16 +00:00
Pablo Polvorin 283aa52b31 Port #2583 from trunk
Use the local (target) domain for firing the s2s_receive_packet hook.  

It was using the external server domain (LFrom) instead of the local domain (LTo).  
This might have impact on mod_caps in s2s scenarios, needs further attention.

SVN Revision: 2584
2009-09-04 21:33:30 +00:00
Badlop 29b2da42f5 Replace calls from 'regexp' to the OTP R12 new module 're' (EJAB-921)
SVN Revision: 2582
2009-09-02 14:26:01 +00:00
Badlop 0175932d86 Update Ingoing s2s connections inner state to hold domain name (thanks to Juan Pablo Carlino)(EJAB-972)
SVN Revision: 2490
2009-08-15 21:39:41 +00:00
Badlop 6eb5b544b4 Remove workarounds that supported R11 or older (EJAB-446)(EJAB-628)(EJAB-997)
SVN Revision: 2486
2009-08-15 20:10:49 +00:00
Karim Gemayel 4258b99b2b API renaming : lresource_as_list -> prep_resource_as_list
SVN Revision: 2128
2009-06-01 16:43:15 +00:00
Karim Gemayel d51d9e9fff API renaming : lnode_as_list -> prep_node_as_list
SVN Revision: 2126
2009-06-01 16:40:51 +00:00
Karim Gemayel 7eb395b87d API renaming : ldomain_as_list -> prep_domain_as_list
SVN Revision: 2124
2009-06-01 16:38:28 +00:00
Karim Gemayel 19d7d79229 API renaming : ldomain -> prep_domain
SVN Revision: 2123
2009-06-01 16:37:15 +00:00
Karim Gemayel 526dc54173 API renaming : parse_jid -> parse
SVN Revision: 2122
2009-06-01 16:35:55 +00:00
Karim Gemayel 447d3818f5 API renaming : make_jid -> make
SVN Revision: 2119
2009-06-01 16:26:00 +00:00
Badlop b473862da6 Added API function to get current S2S connections with information
get_info_s2s_connections(Type) returns a list of incoming (or outgoing)
S2S connections with information for each one including IP address,
port number, TLS options... (thanks to Juan Pablo Carlino)

SVN Revision: 2089
2009-05-19 09:39:13 +00:00
Pablo Polvorin 54a6992ae0 Serialize s2s stanzas to iolist() rather than list()
SVN Revision: 1936
2009-03-02 15:48:01 +00:00
Jean-Sébastien Pédron 842ebfcca0 A lot of bug fixes regarding attribute values type:
o  Fix some bugs by getting attributes as list() instead of binary().
o  Instead creating #xmlattr directly, use the new ?XMLATTR macro; it'll
take care of the anything-to-binary() conversion.
o  Fix a bug where recipient and sender were used as binary() instead of
list(), which is required by the rest of the S2S code.
o  Fix a bug where binary_to_list/1 was called on a list().

Now concerning JIDs :
o  Now that #jid{} isn't part of the API of Exmppp anymore, replace
remaining direct usages by calls to exmpp_jid.
o  Replace exmpp_jid:make_bare_jid() by exmpp_jid:make_jid().
o  Replace exmpp_jid:*_to_jid/1 by exmpp_jid:parse_jid/1.

PR:		EJABP-1

SVN Revision: 1841
2009-01-21 13:34:26 +00:00
Jean-Sébastien Pédron ff500d8297 Merge from trunk (r1787 to r1804).
Included are fixes to src/mod_configure.erl and src/mod_caps.erl.

Note: this merge doesn't include the following revisions because it was
made by previous commits:
r1766, r1768, r1781, r1783, r1794, r1797, r1799, r1802.

Warning: Ejabberd may be broken until the merge is completly finished.

PR:		EJABP-1

SVN Revision: 1829
2009-01-19 14:47:33 +00:00
Pablo Polvorin e0e58711bb XML attributes as binary(). Change Node argument to binary in the following hooks:
disco_local_items, disco_local_features, disco_local_identity, disco_sm_items and 
disco_sm_identity.

SVN Revision: 1780
2009-01-08 14:54:00 +00:00
Pablo Polvorin 4827db4f56 Big #jid to binary() conversion.
Internal tables (ejabberd_router, ejabberd_sm, ejabberd_hooks, mod_last, mod_roster) use binary() as storage.
Basic test using the ODBC backend.

SVN Revision: 1770
2009-01-03 15:15:38 +00:00
Jean-Sébastien Pédron c0e4af9ac0 Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the
error handling.

PR:		EJABP-1

SVN Revision: 1618
2008-10-10 14:33:16 +00:00
Jean-Sébastien Pédron 4eaa8e19c9 Merge from trunk (r1457 to r1563).
SVN Revision: 1564
2008-09-16 14:39:57 +00:00
Jean-Sébastien Pédron 9f0d79da9a o Use the new functions from jlib.
o  Remove the compatibility code. It's becoming confusing to handle every
case every where. Also, in JIDs (normal and short), the atom "undefined'
is expected, not the empty string anymore!

SVN Revision: 1546
2008-08-26 13:38:49 +00:00
Jean-Sébastien Pédron 85c2097ece Update to use the new names used in exmpp_jid.
SVN Revision: 1515
2008-08-06 13:51:42 +00:00
Jean-Sébastien Pédron 8bfccb42a9 Exmpp now takes care of stanza serialization and compatible namespaces.
SVN Revision: 1433
2008-07-11 12:40:49 +00:00
Jean-Sébastien Pédron ffbf8d5faa Convert acl to exmpp.
SVN Revision: 1398
2008-07-01 09:41:32 +00:00
Jean-Sébastien Pédron 8c33e12616 Use the new clause of exmpp_stanza:reply_with_error/2, exmpp_iq:error/2,
exmpp_iq:error_without_original/2 and the new exmpp_jid:make_bare_jid/1.

SVN Revision: 1394
2008-07-01 08:01:06 +00:00
Jean-Sébastien Pédron 06965000a5 Before doing any routing, the router print a warning if old structures
are used. Then it converts the structures to the old format and route
them. The router doesn't care about the structures format but the
conversion is necesary for code called from this module.

In C2S and S2S, no conversion is done before calling
ejabberd_router:route/3.

SVN Revision: 1392
2008-06-30 16:55:03 +00:00
Jean-Sébastien Pédron cc033b3b98 o Use the new functions from jlib.
o  Use the new exmpp_xml:node_to_list/3.

SVN Revision: 1391
2008-06-30 15:51:23 +00:00
Jean-Sébastien Pédron d05c2ee8a1 Use -include_lib instead of -include to include exmpp.hrl. This is a
better solution than specifying the path (with -I) on erlc(1) command
line.

SVN Revision: 1388
2008-06-30 12:13:15 +00:00
Jean-Sébastien Pédron b32aba27c1 o Use the new exmpp namespace macro names.
o  Update send_element/2 to use exmpp new to_list functions.

SVN Revision: 1384
2008-06-27 13:46:08 +00:00
Jean-Sébastien Pédron 22e79490ff Convert to exmpp.
SVN Revision: 1383
2008-06-26 15:48:19 +00:00
Mickaël Rémond 5e9576ffa3 * src/ejabberd_s2s.erl: Added s2s_send_packet and s2s_receive_packet hooks (EJAB-635).
* src/ejabberd_s2s_in.erl: Likewise.

SVN Revision: 1342
2008-05-22 10:53:49 +00:00
Badlop ee6aae8211 * src/ejabberd_s2s_out.erl: Fix long timeout when reconnecting s2s
after a remote server crash (EJAB-540)
* src/ejabberd_s2s_in.erl: Likewise
* src/ejabberd_s2s.erl: Likewise
* doc/guide.tex: Likewise

SVN Revision: 1296
2008-04-18 12:19:45 +00:00
Badlop 07454d8f1a * src/ejabberd_s2s_in.erl (get_cert_domains): When compiling with
Erlang R12, replace the calls to deprecated module PKIX1Explicit88
with OTP-PKIX (EJAB-556)

SVN Revision: 1226
2008-03-11 14:25:35 +00:00
Badlop 2d2fcc8210 * doc/guide.tex: Updated copyright dates to 2008
* src/*: Likewise

SVN Revision: 1153
2008-01-15 17:02:57 +00:00
Jérôme Sautret 38976270b4 * src/Makefile.in: Allow compilation with Erlang R12 (EJAB-446).
* src/aclocal.m4: Likewise
* src/configure.ac: Likewise
* src/configure: Likewise
* src/ejabberd_s2s_in.erl: Likewise

SVN Revision: 1150
2008-01-15 11:11:27 +00:00
Mickaël Rémond 56fe3579bb * Applied copyright update patch 1.
SVN Revision: 1110
2007-12-24 11:41:41 +00:00
Mickaël Rémond 2100ea63ca * Making sure SVN properties are correctly set.
SVN Revision: 970
2007-11-15 10:33:18 +00:00
Mickaël Rémond 48a2813ec6 * src/ejabberd_s2_in.erl: Added debug hook for s2s loop (EJAB-358).
SVN Revision: 947
2007-09-14 14:21:12 +00:00
Mickaël Rémond afec054544 * src/ejabberd_c2s.erl: Option to prevent the use of Erlang OTP supervisor for transient processes (EJAB-354).
* src/ejabberd_s2s_in.erl: Likewise.
* src/ejabberd_s2s_out.erl: Likewise.
* src/mod_muc/mod_muc_room.erl: Likewise.
* src/configure.ac: Likewise.
* src/configure: Likewise.
* src/Makefile.in: Likewise.
* src/mod_muc/Makefile.in: Likewise.

SVN Revision: 931
2007-09-14 14:16:36 +00:00
Mickaël Rémond ffd7267082 * src/ejabberd_s2s_in.erl: Moved s2s connexion information from INFO level to DEBUG level (EJAB-353).
SVN Revision: 929
2007-09-14 14:16:04 +00:00
Mickaël Rémond 9fc203ee6d open up to 3 s2s outgoing connection per domain pair
SVN Revision: 928
2007-09-14 14:15:44 +00:00