Dmitry Podgorny
9ee08f8f2a
Release libstrophe-0.10.0
0.10.0
2020-09-16 00:27:34 +03:00
Dmitry Podgorny
7c1061ccbb
autotools: remove rpm files
2020-09-16 00:27:34 +03:00
Dmitry Podgorny
7eab7c3f5e
Android: add missed files and -DHAVE_DECL_VA_COPY
2020-09-16 00:21:01 +03:00
Dmitry Podgorny
4d93b6c0d6
Check for va_copy declaration
...
ctx.c contains a workaround for systems without va_copy() support.
Improve this workaround in the way which is described in the autoconf
manual.
Also check for va_copy declaration in configure time.
Fixes #160 .
2020-09-16 00:07:41 +03:00
Dmitry Podgorny
65b3a0996f
README: mention about license
2020-09-15 03:14:54 +03:00
Dmitry Podgorny
4dd78be10d
tls/openssl: fix compilation with older openssl
...
Not all error codes are present in older versions of openssl.
2020-09-15 03:07:02 +03:00
Dmitry Podgorny
8c076ac969
stanza: remove attribute xmlns in xmpp_stanza_reply()
2020-09-15 02:21:18 +03:00
Dmitry Podgorny
7c68aced35
stanza: add xmpp_stanza_reply_error()
...
This function makes an error reply stanza as described in
https://tools.ietf.org/html/rfc6120#section-8.3
2020-09-15 02:19:20 +03:00
Dmitry Podgorny
197896ba1b
tls/openssl: improve logging
...
Log error names and codes to increase verbosity in debug mode.
2020-06-18 22:18:59 +03:00
Dmitry Podgorny
bef411f319
sha1: fix zeroing storage
...
Compilers remove dead assignments in optimization phase. But SHA1 code
uses them for wiping of sensitive data. Fix this with the trick used
by openssl.
2020-06-18 22:14:04 +03:00
Dmitry Podgorny
7f5ce7d2ae
sha1: remove SHA1HANDSOFF
...
We don't support configuration when SHA1 functions overwrite user's
data. So remove this code not to confuse.
2020-06-19 00:51:33 +03:00
Dmitry Podgorny
47e27c837a
examples/basic: add new conn flags
...
Add options:
--trust-tls
--legacy-auth
2020-06-07 20:43:41 +03:00
Dmitry Podgorny
50a4a983cd
handler: add documentation for global timed handlers
2020-06-06 00:11:24 +03:00
Dmitry Podgorny
428681a185
stanza: add xmpp_stanza_new_from_string()
...
This function creates a stanza object from a string. The string must
contain a single complete stanza. Multiple stanzas will lead to memory
leak and this is not handled in the patch.
2020-06-04 03:44:21 +03:00
Dmitry Podgorny
3dcc5a60f2
Introduce global timed handlers
...
There are situations when applications need more predictable timed
handlers that don't depend on connection status. Other usecase of
the global handlers is to manage offline connections, for example,
reconnect after a disconnection.
2020-06-03 02:11:40 +03:00
Dmitry Podgorny
cba21b5598
examples/register: replace getline() with fgets()
...
getline(3) doesn't exist on all systems.
2020-05-31 22:05:21 +03:00
Dmitry Podgorny
a65dd1059d
resolver: don't build legacy win32 code with c-ares
...
Fix ifdef macros to exclude legacy win32 code when it is not needed.
2020-05-31 21:43:09 +03:00
Dmitry Podgorny
7c83eb0efa
windows: rewrite headers in lower case
...
Otherwise, compilation fails on systems that are case sensitive.
Reference: #159 .
2020-05-31 21:03:44 +03:00
Steffen Jaeckel
f2c658723f
clean-up
2020-04-30 12:03:57 +02:00
Dmitry Podgorny
7ac4b1cc12
Update ChangeLog
2020-04-29 00:24:42 +03:00
Dmitry Podgorny
1c4cb66f5a
conn: remove ternary operator
...
Remove ternary operator where it is redundant.
2020-04-28 23:40:46 +03:00
Dmitry Podgorny
6a50c9cea6
ChangeLog: mention about fixed IPv6 issue
2020-04-02 22:14:15 +03:00
Dmitry Podgorny
37b12ad788
configure: enable check for snprintf()
...
b2e64587 adds the check but it is commented for unknown reason. Enable
it to use advantage of system snprintf() implementation.
2020-04-02 22:12:30 +03:00
Dmitry Podgorny
5530ac690f
rpm: remove libstrophe.spec
...
Major Linux distributions have added libstrophe to their repositories.
We don't have to support our own spec file. If someone needs spec to
build rpm manually, refer to Linux distributions, for example:
https://build.opensuse.org/package/show/network/libstrophe
https://copr-dist-git.fedorainfracloud.org/cgit/linkdupont/fedora-link-extras/libstrophe.git
2020-04-02 19:38:52 +03:00
Dmitry Podgorny
3063d886bd
sasl: remove unused argument
...
_add_key() is a static function which is used only for DIGEST_MD5. Its
argument 'len' is not used and remains 0. Remove it.
2020-03-31 18:58:36 +03:00
Oleg Synelnykov
198bdd77d0
Remove -Wno-unused-parameter
...
Introduced UNUSED macro with cast to void in commoh.h for internal
use. Used cast to void directly in those files which do not
include common.h. Although this change doesn't fix semantic issues
with unused function parameters, it does explicitly mark all those
places, which might require attention in future.
2020-03-31 17:37:12 +03:00
Dmitry Podgorny
20c039fdb8
sock: replace sockaddr with sockaddr_storage
...
sockaddr structure may be insufficient to hold IPv6 address. Replace it
with sockaddr_storage structure.
Fixes #153 .
2020-03-31 16:29:09 +03:00
Dmitry Podgorny
c92fc849e7
Remove C++ files
...
Libstrophe used to provide incomplete C++ API which missed connection
class and wasn't supported for a long time. Remove this API.
2020-02-22 23:19:40 +02:00
Dmitry Podgorny
6fdac3ae72
tests/sha512: add test case for a million of a
2020-01-31 01:59:42 +02:00
Dmitry Podgorny
623ff164de
tests/scram: add HMAC test vector
...
Add test for HMAC and make other tests independent from SHA1.
2020-01-31 01:59:42 +02:00
Dmitry Podgorny
faa46d28a5
scram: fix HMAC-SHA-512
...
HMAC was originally implemented for SHA1 digest according to RFC2104.
The RFC defined blocksize for all digests as 64 bytes. But RFC4868
requires blocksize for SHA384/SHA512 to be 128 bytes.
Extend HMAC implementation to support variable blocksize and fix it for
SHA384/SHA512.
2020-01-31 01:59:42 +02:00
Dmitry Podgorny
1ca10fd167
Fix SASL SCRAM implementation
...
* Add SCRAM_DIGEST_SIZE macro for maximum possible digest size. It will
avoid new buffer overflow errors when new digests are added.
* Fix buffer overflow in sasl_scram(). Buffers were allocated for SHA1
digest size.
* Fix bug with handler re-registration when a SASL SCRAM mechanism
fails.
2020-01-31 01:59:42 +02:00
Steffen Jaeckel
709e41fd10
add SHA256&SHA512 tests
2020-01-31 01:59:42 +02:00
Steffen Jaeckel
771d5865ae
add SCRAM-SHA-256 and SCRAM-SHA-512 support
2020-01-31 01:59:42 +02:00
Steffen Jaeckel
fc064bc883
re-factor SCRAM to be independent of the hash
2020-01-31 01:34:23 +02:00
Steffen Jaeckel
2ca2fcfedd
add stripped-down & slightly-modified version of LibTomCrypt SHA512
2020-01-31 01:34:09 +02:00
Steffen Jaeckel
d78b02ee24
add stripped-down & slightly-modified version of LibTomCrypt SHA256
2020-01-31 01:33:51 +02:00
Steffen Jaeckel
2a94a49cef
add required LibTomCrypt load/store functions
2020-01-31 01:32:45 +02:00
Dmitry Podgorny
562a06425b
Unify coding style
...
@sjaeckel integrated clang-format with formal coding style. Run his
script and commit changes.
There are pros and cons of this commit.
Mixed coding style is a "broken window". A good single style simplifies
reading and writing code.
On the other hand, this is a big change which will lead to conflicts.
2020-01-31 01:16:50 +02:00
Steffen Jaeckel
eef07cef36
add code style check to travis
2020-01-31 01:14:32 +02:00
Steffen Jaeckel
2e21d5a021
add new format make target
2020-01-31 01:14:32 +02:00
Steffen Jaeckel
abd1b08a97
trim trailing spaces
2020-01-31 01:14:32 +02:00
Steffen Jaeckel
3feed16e2e
ignore eclipse related stuff
2020-01-31 01:14:32 +02:00
Dmitry Podgorny
6b38216124
util: replace time_stamp() implementation
...
Replace Windows/Xbox implementation with solution from NetXMS project.
2020-01-26 00:52:54 +02:00
Dmitry Podgorny
8cfb2d2a03
XEP-0077: add examples/register
...
XEP-0077 will not be implemented as part of libstrophe's API, but an
example is provided. The example shows how to use the "raw" connection
to register a user.
Closes #54 .
2020-01-25 22:59:19 +02:00
Michael Vetter
1b10e8f987
resolver: include headers for select(2)
...
C-ares implementation uses select(2) but doesn't include required
headers.
Fixes #149 .
2020-01-25 22:06:07 +02:00
Dmitry Podgorny
178f566ae2
Unify include of strophe.h
2020-01-10 01:28:47 +02:00
Dmitry Podgorny
0326e5c5e2
handler: avoid unnamed union
...
Unnamed unions appeared only in C11 standard. Don't use them to
increase portability.
2020-01-10 01:22:53 +02:00
Dmitry Podgorny
212df6d036
tests: add test for stanza functions
...
Check reference counting in xmpp_stanza_add_child() amd
xmpp_stanza_add_child_ex().
2020-01-10 00:50:22 +02:00
Dmitry Podgorny
4b04db6b2d
stanza: add xmpp_stanza_add_child_ex()
...
This function is introduced by NetXMS project.
2020-01-10 00:49:45 +02:00