Skip to content
Snippets Groups Projects
Commit 61f56ddb authored by Raul Fuentes's avatar Raul Fuentes
Browse files

pkg/tinydtls: Moving to official repository

The integration of TinyDTLS for RIOT has been merged into the
development branch of the official repository.

It will be officially available on the master branch in the next
release of tinyDTLS.

Other minor updates:
- Support for the RIOT's memarray
- tinydtls/sha2 is removed from the compilation for giving priority
to RIOT's sha2 functions.
parent b4d2882c
No related branches found
No related tags found
No related merge requests found
PKG_NAME=tinydtls
PKG_URL=https://github.com/rfuentess/TinyDTLS.git
# PKG_VERSION=RIOT-OS
PKG_VERSION=eb6f017ab451bb6cc4428b3e449955a76aeeba19
PKG_URL=https://git.eclipse.org/r/tinydtls/org.eclipse.tinydtls
PKG_VERSION=84f1f4e3ca13101a5a9aedeaf08039636c4f34dd
PKG_LICENSE=EPL-1.0,EDL-1.0
CFLAGS += -Wno-implicit-fallthrough
......@@ -15,7 +14,6 @@ all: git-download
@cp $(PKG_BUILDDIR)/Makefile.riot $(PKG_BUILDDIR)/Makefile
@cp $(PKG_BUILDDIR)/aes/Makefile.riot $(PKG_BUILDDIR)/aes/Makefile
@cp $(PKG_BUILDDIR)/ecc/Makefile.riot $(PKG_BUILDDIR)/ecc/Makefile
@cp $(PKG_BUILDDIR)/sha2/Makefile.riot $(PKG_BUILDDIR)/sha2/Makefile
"$(MAKE)" -C $(PKG_BUILDDIR)
include $(RIOTBASE)/pkg/pkg.mk
ifneq (,$(filter tinydtls,$(USEPKG)))
USEMODULE += tinydtls
# Mandatory for tinyDTLS
CFLAGS += -DDTLSv12 -DWITH_SHA256
# Dependencies partially under control of the App's requirements
# The configuration for socket overrides Sock
ifeq (,$(filter WITH_RIOT_SOCKETS,$(CFLAGS)))
CFLAGS += -DWITH_RIOT_GNRC
endif
# NOTE: PSK should be enabled by default BUT if the user define any other cipher
# suite(s) it should not be enabled.
# TODO: Create the flag DTLS_CIPHERS with keywords PSK, ECC (and future)
ifeq (,$(filter -DDTLS_PSK,$(CFLAGS)))
ifeq (,$(filter -DDTLS_ECC,$(CFLAGS)))
CFLAGS += -DDTLS_PSK
endif
endif
# Handles the verbosity of tinyDTLS. Default: Minimum or just error messages.
ifeq (,$(filter -DTINYDTLS_DEBUG,$(CFLAGS)))
ifeq ( , $(TINYDTLS_LOG))
CFLAGS += -DTINYDTLS_LOG_LVL=0
else
CFLAGS += -DTINYDTLS_LOG_LVL=$(TINYDTLS_LOG)
endif
else
CFLAGS += -DTINYDTLS_LOG_LVL=6
endif
endif
ifneq (,$(filter tinydtls,$(USEMODULE)))
USEMODULE += memarray
USEMODULE += hashes
USEMODULE += tinydtls_aes
USEMODULE += tinydtls_ecc
USEMODULE += tinydtls_sha2
endif
......@@ -13,7 +13,3 @@ endif
ifneq (,$(filter tinydtls_ecc,$(USEMODULE)))
DIRS += $(PKG_BUILDDIR)/ecc
endif
ifneq (,$(filter tinydtls_sha2,$(USEMODULE)))
DIRS += $(PKG_BUILDDIR)/sha2
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment