Commit Graph

127 Commits

Author SHA1 Message Date
Vitaly Takmazov
58613ea7f3 fix MSVC build 2014-09-08 13:41:30 +03:00
Dmitry Podgorny
bf5bf96e95 sha1: removed xmpp_ prefix from SHA1 symbols
Prefix was introduced in a981c0a as a workaround. Now, non-public API is
not exported, so this patch hides SHA1 symbols for dynamic library.
2014-09-07 00:02:14 +03:00
Dmitry Podgorny
fd4f26e5d4 tls_schannel: [style] removed trailing spaces 2014-09-06 23:43:43 +03:00
Dmitry Podgorny
e7f87c652e tls_schannel: [style] use LF for EOL, not CR+LF 2014-09-06 22:32:16 +03:00
Dmitry Podgorny
65d2535302 tls_openssl: removed unused openssl/rand.h 2014-09-06 22:31:53 +03:00
Dmitry Podgorny
a981c0a733 sha1: workaround for name collision with libcrypto
src/sha1.c is used only for internal purposes. So, just add prefix
xmpp_ to the SHA1 symbols.
2014-08-31 01:47:03 +03:00
Dmitry Podgorny
b08625ef4a md5: MD5Transform should be static 2014-08-31 01:46:19 +03:00
Dmitry Podgorny
ea719cd02a SCRAM-SHA-1 authentication mechanism support 2014-08-31 00:44:08 +03:00
Dmitry Podgorny
52dcd26b8c sasl: don't use uninitialized variable
base64_decode() used uninitialized variable when unable to allocate memory.

Reported-by: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
2014-08-30 15:14:22 +03:00
Dmitry Podgorny
cf361d35fe auth: removed useless static declaration
_handle_open_tls() declared as static function but not defined.
2014-08-26 14:53:15 +03:00
Damian Obernikowicz
783bad0897 Fixed memory leak 2014-08-20 00:36:59 +03:00
James Booth
15650f16b9 Revert "Fixed a potential buffer overflow in xmpp_stanza_to_text when the stanza length was greater than the default buffer size of 1024. Tested on Windows only."
This reverts commit 4b194b98cf.
2014-04-30 21:43:50 +01:00
Alexander Kass
03b6e90b94 warning fix 2013-09-07 11:58:16 +04:00
Alexander Kass
badebfa840 standard memset error
size of pointer instead of object
2013-09-07 11:58:16 +04:00
Alexander Kass
55b6da74d8 len should be signed 2013-09-07 11:58:16 +04:00
Sharjeel Aziz
4b194b98cf Fixed a potential buffer overflow in xmpp_stanza_to_text when the stanza length was greater than the default buffer size of 1024. Tested on Windows only. 2013-07-31 10:33:52 -04:00
KuRi
28319c2c0d Fixed Indenting 2013-04-19 23:13:15 +02:00
KuRi
43aa61f3db Updated file format 2013-04-19 22:49:05 +02:00
KuRi
840bfda332 Changed TimedOut error to Conn Reset 2013-04-19 22:45:02 +02:00
Luis Angel Curiel Sanz
cc9e29c671 Fixed sock_read on Windows when returning cero
Fixed coding style
2013-04-19 10:46:47 +02:00
Luis Angel Curiel Sanz
b41732ada7 Fixed bug on sock_read. It returns 0 when an error reading occurs, and this situation was not being controlled. 2013-04-19 08:39:59 +02:00
Alexandre Erwin Ittner
c0b1e5b7fe Fix escaping of XML text and attributes
There was a bug in xmpp_send which caused XML special characters to be
sent to the server verbatim, implying in invalid stanzas and making the
server drop the connection. This commit fixed the bug escaping such
characters with the usual rules.

Bugs: The code now do several (de)allocation operations in every send,
this may have a negative effect on performance when used with slow
memory managers.

License: This code is distributed under the same license used by strophe
(i.e., GPLv3 or MIT).
2012-09-23 17:18:53 -03:00
James Booth
5875390968 Fixed spacing 2012-05-20 05:16:20 +01:00
James Booth
a572d055a8 Fixed wrong flag setting 2012-05-20 02:10:19 +01:00
James Booth
9615a55856 Added option to disable TLS
The connection object includes a tls_support flag, which can
be disabled with xmpp_conn_disable_tls().
2012-05-20 01:50:32 +01:00
Jack Moffitt
713cfa245a Another try at OpenBSD fixes.
nameser_compat.h is required on Darwin, but doesn't exist on
OpenBSD. Also, OpenBSD doesn't support the ns_c_in or ns_t_srv enums,
so the C_IN and T_SRV macros are required.
2012-02-10 22:10:32 -07:00
Jack Moffitt
f9471368f5 Fix snprintf warnings about missing format strings. 2012-02-08 21:46:37 -07:00
Jack Moffitt
143eec7e1f Remove need for nameser_compat.h. 2012-02-08 21:46:25 -07:00
Jack Moffitt
7032ede88a Missed a bit of cleanup. 2012-02-08 08:52:16 -07:00
Andrew Potter
128c155681 Fix memory leak in commit 30d4f2b7
va_end() has to be called after each invocation of va_copy(). So when
log messages are short, the copy was leaked. When log messages were
long, the old ap would get lost.
2012-02-08 00:00:57 -07:00
Jack Moffitt
fc3d025c7f Fix compiler warning. 2012-02-07 22:57:46 -07:00
Jack Moffitt
801a844e30 Initialize conn->state.
Fixes #13.
2012-02-07 22:54:09 -07:00
Jack Moffitt
13175787fc Document handler return values. 2012-02-07 22:49:56 -07:00
Jack Moffitt
ee8afdb64e Memory leak fixes from @elisamanfrin.
Fixes issue #4.
2012-02-07 22:46:38 -07:00
Jack Moffitt
90d4c54d81 Merge pull request #12 from vladmihaisima/fix_ssl
Bug when using SSL communication
2012-02-07 20:33:56 -08:00
U-vladms-pc\vladms
5344669bb7 Added tls_pending to windows schannel implementation of tls 2012-01-10 17:35:53 +01:00
Vlad-Mihai Sima
511606835d Bug fix: when using tls, if a stanza is bigger than the buffer of 4096 in event.c, the stanza will not be read as select will return 0 on the ssl socket and the data will be in ssl buffers. Partial fix, only for Linux for now 2012-01-01 20:09:18 +01:00
Rob Hoelz
30d4f2b78d Fixing logging when stanzas are too big 2011-09-07 20:09:19 -05:00
Russell Zuck
28da8ea988 fix for error in return status logic from libxml2 function 2011-05-05 13:22:23 -06:00
Dustin Sallings
d048124969 Capture the bound jid.
I'd kind of like to be able to discover the JID with full resource for
some operations.
2009-06-15 14:37:21 -07:00
Jack Moffitt
370a371800 Dual licensed libstrophe under MIT and GPLv3.
Updated copyright headers.
2009-06-15 15:26:10 -06:00
Jack Moffitt
a58b0e4b04 Patch to fix select time values from xue yong zhi <xue.yong.zhi@gmail.com> applied. 2009-05-05 13:29:01 -06:00
Jack Moffitt
2eb9847ba8 Fixed memory leak in one off handlers. 2009-04-14 15:53:04 -06:00
Jack Moffitt
398d774c59 Fixed memory leak in new parser abstraction. 2009-04-14 15:36:03 -06:00
Jack Moffitt
b522704567 Merge commit 'dustin/master'
* commit 'dustin/master':
  Ignore test artifacts.
  Ignore TAGS.
  Log the result of a connect.
  If an altdomain was specified, use it instead of SRV lookups.
  Free the connection language.
  Handle a case where the query has no namespace.
2009-04-14 14:53:29 -06:00
Jack Moffitt
20bac5b4de Fixed small memory leak in id handler logic. 2009-04-14 14:22:34 -06:00
Dustin Sallings
690c0c1e85 Log the result of a connect. 2009-04-14 13:11:38 -07:00
Dustin Sallings
e852bfb62e If an altdomain was specified, use it instead of SRV lookups.
For whatever reason, SRV lookups are hanging for me for about 30
seconds making testing suck.
2009-04-14 13:11:38 -07:00
Dustin Sallings
3156f5044f Free the connection language.
This created a memory leak when freeing a connection.
2009-04-14 13:11:38 -07:00
Jack Moffitt
3fd7515dcf Abstracted XML parser library and switched to autotools building.
expat is still the default parser, but libxml2 can also be used
via an option to the configure script.  New parsers can easily be
added by implementing a parser_foo.c that uses the interface defined
in parser.h.
2009-04-14 13:47:20 -06:00