Commit Graph

37 Commits

Author SHA1 Message Date
rcorniere
3c9b0db5b8 Fixed decoder usage.
Decoders have internal buffering, and creating many on a single TCP connection can cause issues in parsing exchanged XML documents.
2019-12-10 17:53:42 +01:00
Wichert Akkerman
2f8ec7b36f Only try startTls if the connection is not secure 2019-10-28 16:38:10 +01:00
Wichert Akkerman
6da1962962 Correctly open new streams after StartTLS and auth 2019-10-28 16:38:10 +01:00
Wichert Akkerman
33446ad0ba Create a new stream after StartTLS 2019-10-28 16:38:10 +01:00
Wichert Akkerman
92329b48e6 Transports need to handle open/close stanzas
XMPP and WebSocket transports require different open and close stanzas. To
handle this the responsibility handling those and creating the XML decoder is
moved to the Transport.
2019-10-28 16:38:10 +01:00
Wichert Akkerman
8db608ccc1 Add IsSecure() to Transport 2019-10-28 16:38:10 +01:00
Wichert Akkerman
96fccbd399 Split out TransportConfiguration
This allows using the same transport configuration from both clients and components.
2019-10-28 16:38:10 +01:00
Wichert Akkerman
a3c62e515e Introduce Transport interface 2019-10-28 16:38:10 +01:00
Mickael Remond
9c8353d081 Introduce Credential structure to define auth type
For now we are planning to support Password and OAuthToken.
In the future, we would like to add certificate-based authentication.
2019-10-01 11:40:31 +02:00
Mickael Remond
80d2e0fa1e Remove debug print-out 2019-08-06 16:02:33 +02:00
Mickael Remond
2e864ff7f6 Clean-up: remove test/debug code 2019-08-06 16:02:33 +02:00
Mickael Remond
3de99e0e0e Add initial support for stream management
For now it support enabling SM, replying to ack requests from server,
and trying resuming the session with existing Stream Management state.
2019-08-06 16:02:33 +02:00
Mickael Remond
e531370dc9
An invalid certificate is a permanent error if we do not skip cert check 2019-07-31 11:43:54 +02:00
Martin/Geno
e05f36c69f init empty TLSConfig, if nothing given 2019-07-16 11:00:42 +02:00
Mickael Remond
d36428fb2f
Avoid copying tls.Config lock
Fixes #90
2019-07-15 18:40:20 +02:00
Mickael Remond
9577036327 Add support for self-signed certificates 2019-07-15 12:22:21 +02:00
Mickael Remond
604d2c6c1e
Improves comments 2019-06-29 17:48:38 +02:00
Mickael Remond
7c71d93026
Remove unused channels 2019-06-29 17:39:59 +02:00
Mickael Remond
cca0919b8a
Fix session element parsing on IQ 2019-06-29 17:39:19 +02:00
Mickael Remond
40e907e8ee
Clean-up & refactor 2019-06-29 16:49:54 +02:00
Mickael Remond
5992cc2231 Fix XMPP logger consistency
- Rename socketProxy to StreamLogger
- Ensure client send traffic through the logger
2019-06-29 10:47:07 +02:00
Mickael Remond
428787d7ab
Refactor and move parsing and stanza to a separate package 2019-06-26 17:14:52 +02:00
genofire
d9fdff0839 Add constants (enumlike) for stanza types and simplify packet creation (#62)
* Add constants (enumlike) for stanza types
* NewIQ, NewMessage and NewPresence are now initialized with the Attrs struct
* Update examples
* Do not export backoff code. For now, we do not need to expose backoff in the documentation
* Make presence priority an int8
2019-06-22 11:13:33 +02:00
Mickael Remond
af0ae525b8 An IQ can only have a single payload
"An IQ stanza of type "get" or "set" MUST contain exactly one
 child element, which specifies the semantics of the particular
 request."
2019-06-19 14:03:42 +02:00
Mickael Remond
4d015e5b29
With go modules, we should be able to remove import comments 2019-06-18 16:28:30 +02:00
Mickael Remond
709a95129e
Clean up and fix StartTLS feature discovery
Required field was never set to true
2019-06-10 16:27:52 +02:00
Mickael Remond
1be04b0fba
Expose JID fields and rename to match XEP-0029 wording
See: XEP-0029 - Definition of Jabber Identifiers (JIDs)
https://xmpp.org/extensions/xep-0029.html
2019-06-07 15:56:41 +02:00
Mickael Remond
2d8d4516fd
Handling basic unrecoverable errors
Fix #43
2019-06-07 15:23:23 +02:00
Mickael Remond
f45829916c Add tool to check XMPP certificate on starttls
Minor refactoring
2019-05-16 17:48:53 +02:00
Mickaël Rémond
b030e8dd4b
Merge pull request #13 from hypafrag/xml_charset_reader_support
added charsets support
2019-01-17 12:03:37 +01:00
Mickael Remond
5eae7f4ef7
Move project to gosrc.io/xmpp
The URL will be more permanent as this is a place we dedicate as short URL for our go projects.
2018-12-26 18:50:01 +01:00
hypafrag
3a51dce786 added charsets support 2018-10-13 19:45:48 +07:00
Mickael Remond
fa5590e921
Rename Options to Config 2018-09-26 16:25:04 +02:00
Mickael Remond
d33490cdc0
Work-in-progress on dynamic IQ parsing 2018-01-16 22:33:21 +01:00
Mickael Remond
dade3504f0
Improve generic IQ parsing 2018-01-15 12:28:34 +01:00
Mickael Remond
10219ec1e6
Refactor parsing / improve typing 2018-01-13 18:50:17 +01:00
Mickael Remond
710174b165
Moving XMPP library to Fluux project 2018-01-01 18:12:33 +01:00