Commit Graph

5 Commits

Author SHA1 Message Date
Olaf Bergmann
d99fb8c4d9 crypto: Make key and nonce const for dtls_encrypt/decrypt
The key and nonce argument of the (deprecated) functions dtls_encrypt()
and dtls_decrypt() should be const as noted in [1]. This change requires
nonce also to be const in dtls_ccm_params_t.

[1] https://github.com/eclipse/tinydtls/issues/25

Closes #25

Change-Id: Ic6a0801d48eb88c726eee232c8971449c459be29
2020-01-14 10:24:31 +01:00
Olaf Bergmann
785bb50522 ccm.c: changed AAD length type for add_auth_data() to 64 bit
To allow AAD with more than 2^32 - 1 bits, the type of the parameter
la has been changed to uint64_t. This also avoids triggering the
type-limits compiler warning.

Change-Id: I81cb889b2add2e7d29d159fb0054d028f5d07553
2018-02-16 10:27:27 +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
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
e1388b3980 New initial commit 2016-02-02 18:39:21 +01:00