This has the following optimization potentials which are also applied.
- crypto: only one HMAC context is required
- crypto: integrate last iteration into loop
- hmac: remove dtls_hmac_new()/_free()/_storage_init() as dtls_hmac_new()
now only is used in tests
Co-Authored-By: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
Signed-off-by: Martine Lenders <m.lenders@fu-berlin.de>
HAVE_ASSERT_H is controlled by tinydtls.h which must be included
first. assert.h is included only if assert() is not defined already.
Change-Id: Ib28e5d9452c9f263c02363bb5c2780c68d77017b
To avoid multiple definitions of assert(), the header assert.h is
included only if assert() is not defined.
Change-Id: Ib598248d1675da4d5225d9700f6133be525d5d42
For platforms other than Contiki, dtls_hmac_storage_init() was
defined inline in hmac.h which cluttered the interface.
Change-Id: I9eb1f0b6a299ef3b60560b3d529dde39d610cd33
The code has been cleaned up to
1. provide proper prototypes for functions that take no arguments (void),
2. avoid signedness issues, and
3. provide missing cases for switch statements.
Change-Id: I9e84ddb9ef6594c374ad817330a43b22642ebb33
Fixes dtls_config.h not visible in headers
Include dtls_config.h in tinydtls.h and include tinydtls.h in all necessary
headers.
Remaining headers do not use 'ifdef', but they may require it too.
Change-Id: I39c86dffc8bbc8bd7551e74386994f92f49d00ec
Signed-off-by: Gaëtan Harter <gaetan.harter@inria.fr>