dtls_sha256_transform() fails for esp-idf systems as the data parameter
is a uint32 and may not be aligned to a word boundary when
processing the server-hello handshake.
sha2/sha2.c:
Make the data parameter byte aligned (as does most other sha256
implementations) for function dtls_sha{256|512}_transform().
Replace REVERSE32 and REVERSE64 macros with get32be(), put32be(),
get64be() and put64be() functions which are byte aligned.
Remove some of the now unneeded "#if BYTE_ORDER == LITTLE_ENDIAN".
sha2/sha2.h:
Allow sha384 to be built (not been tested).
Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
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>
this change is for resolving |sha2| symbol-conflict in using
|tinydtls| with other crypto modules. this symbol-conflict could
occur on the |tinydtls|-deployed systems with using |OpenSSL| or
|OpenSSL|-like, which has another |SHA| symbols.
In case of |iotivity-tinydtls|, the conflict occurs between
|iotivity-tinydtls| and the deployed |crypto| library, which has
also another |SHA|.
[patch #1] initial commit
[patch #2-3] updated commit message
[patch #4] reverted renaming for internal symbols
[patch #5] updated symbols with lower-case
[patch #6] fixed typo for calling API
bugs: https://bugs.eclipse.org/bugs/show_bug.cgi?id=490467
Change-Id: I6942870c7c31544e89a20209d21730406ffb08d2
Signed-off-by: Kyungsun Cho <goodsun.cho@samsung.com>