Commits on Feb 22, 2012
  1. Fix typo (lists:ketytake)

    ppolv committed Feb 22, 2012
  2. Fix typo in last fix

    ppolv committed Feb 22, 2012
  3. fix for EXMPP-62

    (cherry picked from commit f628113)
    abhinavsingh committed with ppolv Feb 19, 2012
Commits on Feb 3, 2012
Commits on Feb 2, 2012
  1. Add timeout option to connect() and login() calls

    Add a new option {timeout, Timeout} to
    connect_tcp/4, connect_bosh/4 and connect_ssl/4
    Add a Timeout parameter to login() calls:
    login(Session, Timeout).
    login(Session, Mechanism, Timeout).
    ppolv committed Feb 2, 2012
Commits on Dec 23, 2011
Commits on Dec 19, 2011
  1. OSX Lion compatibility

    cosgroveb committed with badlop Dec 19, 2011
Commits on Dec 16, 2011
  1. R15 compatibility.

    R15B introduced some incompatible changes in driver interface.
    Some driver callbacks started using ErlDrvSizeT and ErlDrvSSizeT
    typedef instead of int.
    This patch changes callbacks to use the new typedefs and provides
    compatibility fallbacks for older OTP versions.
    committed with badlop Dec 15, 2011
Commits on Oct 4, 2011
  1. Protection against billion laughs attack in legacy expat driver.

    Disable entity expansion completely.
    committed with badlop Sep 27, 2011
  2. Fix libxml2 parser.

    Add missing call to reset_context() while resetting parser.
    Fix exmpp hash table in case of -1 length (strcmp() result
    was not compared against 0) which caused check_elems/check_nss
    not to work for libxml2.
    committed with badlop Sep 27, 2011
  3. Use Erlang memory allocation functions in XML parsers.

    Direct all XML parsers to use Erlang memory allocation functions
    committed with badlop Sep 26, 2011
Commits on Sep 29, 2011
  1. Add whitespace ping for client sessions

    IF the option {whitespace_ping, Seconds} is
    passed to connect_TCP or connect_SSL,
    then send "\n" on the socket if inactive for that
    ppolv committed Sep 29, 2011
Commits on Sep 26, 2011
Commits on Sep 20, 2011
  1. Enable ECDHE only on OpenSSL 1.0.0e and later.

    Earlier versions of OpenSSL have security problems with ECDHE.
    See for details.
    committed with badlop Sep 19, 2011
  2. Guard ephemeral DH with ifdefs.

    committed with badlop Sep 18, 2011
  3. Support for ECDHE in OpenSSL driver.

    Adds support for ephemeral elliptic curve Diffie–Hellman in OpenSSL
    driver. Works only with OpenSSL 1.0.0 (OpenSSL 0.9.8 is supposed
    to support ECDHE, but it seems not to work).
    committed with badlop Sep 18, 2011
  4. Initialize driver data with memset.

    Driver data structure was initialized in start() one field at
    a time. This is error prone (in fact, bio_read and bio_write
    were not initialized there). Use memset to initialize the whole
    Additionally, set connection and context structures to NULL in
    error path of init_library().
    committed with badlop Sep 18, 2011
  5. Enable ephemeral Diffie-Hellman parameters in OpenSSL driver.

    DH parameters (taken from OpenSSL tarball) are hardcoded in
    the source. They are public and this is exactly the same approach
    as taken by various other servers (Apache, nginx).
    committed with badlop Sep 16, 2011
  6. Decrease CPU usage caused by exmpp_tls:send with large data.

    Sending one large chunk of data with exmpp_tls:send eats lots of
    CPU power and blocks whole Erlang emulator. This is caused by the
    fact that encrypted output is read from memory BIO in 1k chunks.
    Memory BIO, after reading data, shifts the remaining part.
    If large chunks of data (few MB) is sent and then read in 1k
    chunks, then a _lot_ of shifting is performed eating CPU.
    The solution is to simply allocate binary of the needed size
    (amount of data in memory BIO can be retrieved with
    BIO_ctrl_pending) and then issue only one read that reads the
    whole data.
    committed with badlop Sep 15, 2011
  7. Disable SSL 2.0 and session cache in OpenSSL driver

    SSL 2.0 has security flaws and is deprecated for many years.
    Session cache currently does not work anyway (as new SSL
    context is made for every connection) so disable it.
    Additionaly, instruct OpenSSL to free network buffers on idle
    connections (this is available only in OpenSSL 1.0.0).
    committed with badlop Sep 12, 2011
Commits on Sep 18, 2011
Commits on Sep 12, 2011
  1. Fix compatibility with R12B5

    There is no min/2 function in R12B5.
    committed with badlop Sep 11, 2011
  2. Use extended marker and driver versioning without SMP support.

    Extended marker indicates that driver supports additional flags
    like versioning and port level locking. Currently it was only
    used when SMP support was enabled. Versioning seems like a nice
    feature and has nothing to do with SMP (and is present in R12B5)
    so enable it regardless of SMP support.
    committed with badlop Sep 11, 2011
  3. Fix memory leaks in OpenSSL TLS driver.

    SSL context and connection structures were never freed.
    Additionally, trusted_certs also was never freed.
    committed with badlop Sep 11, 2011
  4. Enable port level locking in zlib compression driver.

    zlib is thread-safe (as long as memory allocation functions it
    uses are thread safe) so enable port level locking in zlib
    compression driver.
    committed with badlop Sep 11, 2011
  5. Use ERTS allocation functions in exmpp_compress_zlib

    exmpp_compress_zlib now configures zlib to use ERTS
    allocation functions (driver_alloc/driver_free)
    which are guaranteed to be thread-safe.
    committed with badlop Sep 11, 2011
  6. Eliminate lock contention on stringprep port

    exmpp_stringprep module used to open only one port, so there
    was still a lot of lock contention on port access.
    Now it opens as many ports as there are scheduler threads
    (as described in Erlang Efficiency Guide).
    committed with badlop Sep 10, 2011
  7. Enable port level locking for OpenSSL TLS driver.

    OTP crypto module is already using OpenSSL and sets some
    global OpenSSL callbacks that are needed to make it thread-safe.
    To avoid problems with own callbacks, start crypto before
    loading OpenSSL driver and enable port level locking if the
    needed callbacks are already set.
    committed with badlop Sep 10, 2011
  8. Enable port level locking in stringprep driver.

    By default Erlang uses driver level locking.
    However, it seems there is no reason for stringprep driver not to
    use port level locking, thus reducing lock contention.
    committed with badlop Sep 10, 2011
Commits on Sep 2, 2011
Commits on Aug 16, 2011
  1. Fixes in exmpp_tls:get_peer_certificate/1 (thanks to Janusz Dziemidow…

    - compatibility with R14
    - fixed case of no certificate
    - documentation update
    badlop committed Aug 16, 2011
  2. Functions to retrieve latest "Finished" SSL message (thanks to Janusz…

    … Dziemidowicz)(EXMPP-58)
    badlop committed Aug 16, 2011
Commits on Aug 6, 2011
  1. Fixed author email address

    ebustos committed Aug 6, 2011