Tristan Le Guern
0d4bcc0228
Extract the copy loop into its own function
...
It will help reduce code duplication for xmpp_stanza_copy
2015-10-20 16:26:43 +03:00
Tristan Le Guern
90a595f8ef
Implements helpers for to and from attributes
...
xmpp_stanza_{get,set}_{from,to}
2015-10-20 15:22:20 +03:00
Dmitry Podgorny
64d65b3aed
examples: mention about xmpp_conn_set_flags()
...
xmpp_conn_set_flags() provides features that people sometimes look for.
Adding comment to examples will simplify the search.
2015-10-20 14:36:43 +03:00
Dmitry Podgorny
a39267c1b0
conn: use altport for legacy ssl if specified
2015-10-19 22:42:44 +03:00
Dmitry Podgorny
331db6f565
tests: added test vectors for MD5
2015-10-18 03:05:38 +03:00
Dmitry Podgorny
9cea7e4002
md5: cleanup
...
* Indentation
* Removed MD5DumpBytes()
* Removed ASM_MD5
2015-10-18 03:03:15 +03:00
Dmitry Podgorny
f63aba88d4
conn: fixed indentations
2015-10-18 02:22:15 +03:00
Dmitry Podgorny
a78201bae0
sock: use xmpp_snprintf instead of snprintf
2015-10-16 14:58:18 +03:00
Tristan Le Guern
a61dba0c13
Move declarations of xmpp_{v,}snprintf.
...
Use HAVE_SNPRINTF and HAVE_VSNPRINTF to conditionnaly use an internal
version of these functions or use the libc one.
2015-10-16 14:48:10 +03:00
Dmitry Podgorny
60cfcc72e6
snprintf: moved self-test to a separated test
2015-10-16 00:05:26 +03:00
Dmitry Podgorny
4cc9ba79c4
sock: choose target with the lowest priority
...
sock_srv_lookup chose the last target in the answer section. But it must
choose one with the lowest priority it can reach (due to RFC2052).
2015-10-15 17:49:44 +03:00
Dmitry Podgorny
182803926b
conn: added new API xmpp_conn_set_flags()
...
xmpp_conn_set_flags() and xmpp_conn_get_flags() unify interface of
connection configuration.
This interface allows compile-time check of supported features or even
run-time check. Therefore, applications can be built with older
libstrophe which doesn't support some optional flags.
2015-10-15 16:01:13 +03:00
Dmitry Podgorny
e41b7a06e4
sha1: moved self test to separated test
2015-10-15 00:35:19 +03:00
Dmitry Podgorny
0994022066
scram: renamed BLOCK_SIZE
...
BLOCK_SIZE is too common name, so remove it to HMAC_BLOCK_SIZE.
2015-10-15 00:11:09 +03:00
Dmitry Podgorny
c156e13791
sock: removed unused static functions
2015-10-14 01:45:25 +03:00
Tristan Le Guern
a47b71e52b
netbuf_* and friends should be static
2015-10-13 23:17:09 +02:00
Tristan Le Guern
db908563d0
xmpp_default_logger should be static
2015-10-13 23:16:44 +02:00
Dmitry Podgorny
b5e49a0600
base64: fixed crash when len is small
2015-10-13 23:20:41 +03:00
Dmitry Podgorny
e0a13ecdaa
tests/base64: updated and added to Makefile.am
2015-10-13 23:19:25 +03:00
Dmitry Podgorny
fc856f36a3
tests/parser: fixed gcc warning
...
tests/check_parser.c:59:9: error: variable ‘ret’ set but not used
2015-10-13 22:39:27 +03:00
Dmitry Podgorny
9b67acbfc4
tests: moved common routines to test.[ch]
2015-10-13 22:38:18 +03:00
Dmitry Podgorny
b04c40d3ea
tls: don't hang with openssl implementation
...
* Exit from tls_start() on fatal errors. If SSL_connect() fails and
returns -1 this leads to endless loop in case of fatal error.
* Don't set writefds on SSL_ERROR_WANT_READ. Otherwise, this makes
select(2) exit immediately what leads to CPU usage.
2015-10-13 02:43:23 +03:00
Tristan Le Guern
442914c375
Shorten the nlen+dlen+rlen part
2015-10-13 01:11:45 +03:00
Tristan Le Guern
a4558b69df
Publicly expose JID manipulation functions
2015-10-13 01:11:25 +03:00
Dmitry Podgorny
07751974ac
conn: fixed typo
2015-10-13 00:53:15 +03:00
Dmitry Podgorny
8ff46add8c
conn: don't remember tls state from old connection
...
* Clear conn->secured and conn->tls_failed. These values could be
saved after re-connect.
* conn is not secured if conn->tls is NULL. This condition handles
disconnected connections.
2015-10-13 00:44:23 +03:00
Dmitry Podgorny
b7fbc81740
conn: added API xmpp_conn_is_secured()
...
This patch is provided by @kjkao. New API is already used in
WorksSystems/wks_xep0047.
2015-10-13 00:10:02 +03:00
Dmitry Podgorny
36af7afa27
conn: implemented old-style SSL connection
...
Added new API xmpp_conn_set_old_style_ssl(). This function forces
using of old-style SSL connection.
2015-10-12 22:25:39 +03:00
Dmitry Podgorny
254b9d73a1
sock: do nothing if srv lookup fails
...
Proper action is performed in xmpp_connect_client.
2015-10-12 22:06:27 +03:00
Dmitry Podgorny
8fcac79301
Makefile.am: removed whitespaces
2015-10-12 20:51:24 +03:00
Dmitry Podgorny
a48add8f13
ChangeLog: new features in 0.8.9
2015-10-12 16:12:34 +03:00
Dmitry Podgorny
8627fbb13f
Implemented UUID generation (RFC4122)
...
This patch adds new API:
* xmpp_uuid_gen()
2015-10-12 15:17:22 +03:00
Dmitry Podgorny
5e64c850bd
Added stddef.h to strophe.h to define size_t
2015-10-12 15:02:59 +03:00
Dmitry Podgorny
533664903a
tls: fixed GnuTLS implementation
2015-10-11 16:30:50 +03:00
Dmitry Podgorny
cda805163f
conn: cleanup of headers
...
* added stdarg.h
* removed unused headers
2015-10-11 05:38:12 +03:00
Dmitry Podgorny
3d4c657467
Removed stdio.h from strophe.h
2015-10-11 05:25:19 +03:00
Dmitry Podgorny
8339fd0420
sock: socket should be non-blocking
...
Event loop handles asynchronous connections.
2015-10-11 05:20:31 +03:00
Dmitry Podgorny
63946ff7ef
sock: set AI_ADDRCONFIG only if defined
...
AI_ADDRCONFIG is undefined on some systems.
2015-10-10 23:09:48 +03:00
Dmitry Podgorny
e6bbfa7a62
Updated license in new files
2015-10-10 01:11:08 +03:00
Chih-Wei Chen
b2a98fb9b6
sock : Add IPv6 support
2015-10-10 00:24:08 +03:00
Dmitry Podgorny
f326c2f42f
sha1: added prefix crypto_ to SHA1 API
...
sha1.c contains symbols that overlap with libcrypto. This patch
fixes linking with libstrophe as static library.
Prefix crypto_ will help to group other crypto API in the future.
2015-10-09 12:14:23 +03:00
Dennis Schridde
3b55c20879
Fix --without-libxml2
...
The arguments of AC_ARG_WITH are (package, help-string, [action-if-given], [action-if-not-given]).
action-if-given takes effect when the flag is given in **either** form (--with or --without).
The proper code for action-if-given would thus be with_libxml2=$withval, which is already the default.
Thus leaving this argument empty is the proper course of action.
cf. https://autotools.io/autoconf/arguments.html
2015-10-09 02:20:01 +03:00
christoph
a335466450
Fix invalid write in dopr(...)
...
Fix an invalid write in dopr(...) that occured when maxlen == 0 and
buffer != 0 since 0-1 > 0 using size_t.
2015-10-07 22:45:44 +03:00
Dmitry Podgorny
c73ddf065b
autotools: set development version to 0.8.9
2015-10-07 22:27:26 +03:00
Dmitry Podgorny
fa585fd107
Removed outdated vs2008 directory
2015-10-07 22:20:22 +03:00
Dmitry Podgorny
7a782df9f5
auth: memory leak in _make_scram_sha1_init_msg()
2015-10-07 20:02:45 +03:00
Tristan Le Guern
982d840472
Signed to unsigned conversion to appease GCC
2015-10-07 19:48:35 +03:00
Tristan Le Guern
75938845fd
Add missing prototypes to strophe.h
2015-10-07 19:46:55 +03:00
Dmitry Podgorny
e70e755e19
tests: added UT for SCRAM-SHA1 functions
2015-10-07 19:42:16 +03:00
Dmitry Podgorny
5e37de2b63
tests: added test vectors for Hash_DRBG
2015-10-07 19:35:42 +03:00