Commit Graph

14 Commits

Author SHA1 Message Date
Jan Romann
9320251212 Add Windows support 2022-09-27 14:31:54 +02:00
Jon Shallow
86f4988fc4 github: Add in build and test workflow
Unfortunately out of path builds do not work at present.

Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2022-08-08 09:55:21 +02:00
Jon Shallow
f06e787335 compile warnings: Include WARNING_CFLAGS in all Makefile.in
Fix all the compile warnings generated following adding WARNING_CFLAGS
to all the Makefile.in files.

Fix tests/unit-tests/testdriver failures caused by dtls_prng() return value.

Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2021-06-01 20:08:13 +01:00
Olaf Bergmann
8943e78706 [ECC] ecc.c: improved helper functions
Change-Id: I01ea66db7646e51c6ec80bd875f063776cdfc302
2020-07-21 17:03:23 +02:00
Olaf Bergmann
510ba57920 [ECC] check if r and s are zero before calculating the inverse
The input parameters r and s must not be zero for ECDSA
operations. This change also prevents an infinite loop caused by
calling fieldInv() with zero as its first argument.

This is also a fix for bug 565308 [1]

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=565308

Change-Id: Ie351008fb452dfa513f90b678e8f829b05b634ea
2020-07-21 16:38:05 +02:00
Olaf Bergmann
5c83d4bb91 Make: add uninstall target for Makefiles
make uninstall deletes all files that would have been installed
by make install and removes the directories make install would
have created. Directories that are not empty after uninstalling
the files will be preserved.

Change-Id: I53587dfd765e112e99fb6ab078a33a6174828987
2020-06-25 15:30:27 +02:00
Fabrice Fontaine
3b03c3850a Update Makefile.in to allow cross-compilation
Use DESTDIR and LDFLAGS environment variables passed to configure in
Makefile.in files

[Retrieved (and slightly updated) from:
https://git.buildroot.net/buildroot/tree/package/tinydtls/0001-Update-Makefile.in-to-allow-cross-compilation.patch]

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-05-18 17:27:30 +02:00
Raul Fuentes
530dd2f868 Makefile.riot: imported RIOT-specific Makefiles from rfuentess fork
These Makefiles get copied onto their corresponding Makefiles in
the respective folders from the Makefile in RIOT's pkg/tinydtls.

These files have been imported from @rfuentess's tinydtls port
for RIOT [1].

[1] https://github.com/rfuentess/TinyDTLS

Change-Id: I71cdc42904f8050ea118a107fe998ac1373e0da3
Signed-off-by: Raul Fuentes <ra.fuentes.sam@gmail.com>
2018-02-16 10:27:27 +01:00
Olaf Bergmann
2f7d31ff66 ecc.c: move keyword static to avoid compiler warning
With -Werror=old-style-declaration, gcc complains that the keyword
'static' is not at the beginning of the function declaration. This
change therefore moves it to its usual position before the return
type.

Change-Id: Ied74df3eaa1eb74a0357c7802c047225046d826a
2018-02-16 10:27:27 +01:00
Olaf Bergmann
cc5863fa0e fixed Makefile variables for cross-compilation
When configured for a different host, the variables CC, AR and
RANLIB have not been set correctly. With this fix, tinydtls can
be compiled for another platform when it is configured as a
submodule of an automake-enabled project.

For example, when the dtls branch of libcoap[1] can be cross-compiled
for the raspberry pi as follows:

  ./configure --with-host=arm-linux-gnueabihf --disable-shared

Note that cross-compilation does not yet work without automake as the
m4 macro AM_PROG_AR depends on automake.

[1] https://github.com/obgm/libcoap/tree/dtls

Change-Id: If23080dc7754a48434e7ac787c0bddda1dd9530b
2017-04-18 16:19:38 +02:00
Olaf Bergmann
5fece11e28 ecc/Makefile.in: fix target clean
After renaming OBJECTS to ECC_OBJECTS, the clean target was not
updated.

Change-Id: I0b70e1875d46e59d5df51e78176b09672f285ab7
2017-04-18 15:53:33 +02:00
Gaëtan Harter
38379f5f8a ecc/tests: rename contiki processes names
Both process in 'testecc.c' and 'testfield.c' have the same name which prevents
linking both in the same application.

In testecc.c change process name to 'ecc_test'.
In testfield.c fix typo in the process name 'ecc_filed_test' to 'ecc_field_tset'.

Change-Id: Iaf13c376063a3dbabe480fdcf4de8ddc12b3f8fa
Signed-off-by: Gaëtan Harter <gaetan.harter@inria.fr>
2016-12-05 12:07:44 +01:00
Olaf Bergmann
9e3117ad94 Re-added ECC implementation
Covered by CQ 10516:
http://dev.eclipse.org/ipzilla/show_bug.cgi?id=10516
2016-02-02 18:57:56 +01:00
Olaf Bergmann
e1388b3980 New initial commit 2016-02-02 18:39:21 +01:00