Commit Graph

13 Commits

Author SHA1 Message Date
Benjamin Valentin
5e14e4930b RIOT: make use od for hexdump 2023-02-25 14:37:17 +01:00
Benjamin Valentin
8a36274474 RIOT: make use of log.h for dsrv_log()
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-01-21 11:13:28 +01:00
Jon Shallow
70a2b397af dtls_debug: Add in support for separate logging handler
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>
2022-10-26 13:00:29 +02:00
Jan Romann
9320251212 Add Windows support 2022-09-27 14:31:54 +02:00
Achim Kraus
16d3764191 Support zephyr.
Add initial support for zephyr.
Mutex is currently not supported, nor used.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
2022-07-08 14:51:05 +02:00
Jon Shallow
a37ba81034 Use of -Wwrite-strings and -Wextra throw up compiler warnings
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>
2019-04-01 15:43:01 +01:00
Olaf Bergmann
50b2fb5cd5 dtls_debug.[ch]: move helper functions to .c file
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
2018-02-16 10:27:27 +01:00
Raul Fuentes
3993d52800 dtls_debug.[ch] Adding (void) lines and initial RIOT support
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>
2018-02-16 10:27:27 +01:00
Gaëtan Harter
43c7265e0b contiki: re-add dtls_package_name and dtls_package_version
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>
2017-03-01 13:55:56 +01:00
Olaf Bergmann
320c04b96d Fixes for compiler warnings
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
2017-03-01 13:32:14 +01:00
Gaëtan Harter
080013fd2d contiki: work without running configure
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>
2017-02-27 18:05:10 +01:00
Gaëtan Harter
c9adbab655 tinydtls.h: include dtls_config.h in tinydtls.h
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>
2017-02-27 18:05:10 +01:00
Olaf Bergmann
f623c23ba4 renamed debug.[hc] to dtls_debug.[hc] to avoid naming conflicts 2016-03-08 12:47:11 +01:00