Commit Graph

5 Commits

Author SHA1 Message Date
Jan Romann
9320251212 Add Windows support 2022-09-27 14:31:54 +02:00
Jon Shallow
865ec9ba1d sha2.c: Fix for systems that do not support non word alignment
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>
2019-04-25 13:30:43 +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
Kyungsun Cho
1ddeffa2a9 bug 490467: Renamed |SHA| symbol names on |sha2| module
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>
2016-04-20 16:36:39 +09:00
Olaf Bergmann
b11921d72f Re-added sha2 implementation
Covered by CQ 10515:
http://dev.eclipse.org/ipzilla/show_bug.cgi?id=10515
2016-02-02 18:56:30 +01:00