Allow the application to define a log handler callback to use to provide
consistency in the logging output logic.
Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
dtls.c:
Add in const for dtls_handshake_type_to_name()
dtls_debug.[ch]:
Add in const where appropriate for dsrv_log().
In addition, get dsrv_log() to check printf syntax.
sha2/sha2.c:
Re-order "const static" to "static const" and add in needed const.
Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
Some helper functions such as hexdump() were declared as empty
when the NDEBUG symbol was defined. To clean up the API, the
actual implementation now is moved from dtls_debug.h (were it
was inlined) to dtls_debug.c.
Change-Id: I465f35310e1c64eb59e122a06ae79880fa21aec1
NOTE: RIOT OS own lines for debugging and print must be used
in future patch.
Change-Id: I8733215fd0c649c02a4ecfd8587d1916f020f4b8
Signed-off-by: Raul Fuentes <ra.fuentes.sam@gmail.com>
Signed-off-by: Olaf Bergmann <bergmann@tzi.org>
Statically define PACKAGE_NAME and PACKAGE_VERSION in contiki platform header.
This will require maintaining them in addition to values in configure.ac.
Change-Id: I08948dfdb4ddeafeed273a917367ee5ad237df8f
Signed-off-by: Gaëtan Harter <gaetan.harter@inria.fr>
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
When building with contiki, 'CONTIKI' is defined and is used to detect contiki.
Configure options can be configured with:
DTLS_CONF_ECC, DTLS_CONF_PSK, DTLS_CONF_NDEBUG
All files now include 'tinydtls.h' instead of 'dtls_config.h'.
Change-Id: I9a558a7d6bd777656d7b29028852bfc08911b8b7
Signed-off-by: Gaëtan Harter <gaetan.harter@inria.fr>
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>