forked from espressif/esp-idf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DTLS support to libcoap using TinyDTLS
As TinyDTLS is already a submodule to libcoap, adding in DTLS support is straightforward, but only supports PSK at this point in time. components/coap/CMakeLists.txt: components/coap/component.mk: Add in the new files that have to be built Replace libcoap/src/coap_notls.c with libcoap/src/coap_tinydtls.c components/coap/libcoap: Update the version to include the correct version of tinydtls submodule components/coap/port/include/coap/dtls_config.h: New port file for DTLS components/coap/port/include/coap_config_posix.h: components/coap/port/rijndael.c Include building with TinyDTLS examples/protocols/coap_client/README.md: examples/protocols/coap_client/main/Kconfig.projbuild: examples/protocols/coap_client/main/coap_client_example_main.c: Update CoAP client to support DTLS examples/protocols/coap_server/README.md: examples/protocols/coap_server/main/Kconfig.projbuild: examples/protocols/coap_server/main/coap_server_example_main.c: Update CoAP server to support DTLS Change "no data" to "Hello World!" to prevent confusion See Issue espressif#1379
- Loading branch information
Showing
12 changed files
with
468 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
/* dtls_config.h. Generated from dtls_config.h.in by configure. */ | ||
/* dtls_config.h.in. Generated from configure.ac by autoheader. */ | ||
|
||
/* Define if building universal (internal helper macro) */ | ||
/* #undef AC_APPLE_UNIVERSAL_BUILD */ | ||
|
||
/* Define to 1 if building with ECC support. */ | ||
#define DTLS_ECC 1 | ||
|
||
/* Define to 1 if building with PSK support */ | ||
#define DTLS_PSK 1 | ||
|
||
/* Define to 1 if you have the <arpa/inet.h> header file. */ | ||
#ifndef HAVE_ARPA_INET_H | ||
#define HAVE_ARPA_INET_H 1 | ||
#endif | ||
|
||
/* Define to 1 if you have the <assert.h> header file. */ | ||
#ifndef HAVE_ASSERT_H | ||
#define HAVE_ASSERT_H 1 | ||
#endif | ||
|
||
/* Define to 1 if you have the <fcntl.h> header file. */ | ||
#define HAVE_FCNTL_H 1 | ||
|
||
/* Define to 1 if you have the `fls' function. */ | ||
/* #undef HAVE_FLS */ | ||
|
||
/* Define to 1 if you have the <inttypes.h> header file. */ | ||
#define HAVE_INTTYPES_H 1 | ||
|
||
/* Define to 1 if you have the <memory.h> header file. */ | ||
#define HAVE_MEMORY_H 1 | ||
|
||
/* Define to 1 if you have the `memset' function. */ | ||
#define HAVE_MEMSET 1 | ||
|
||
/* Define to 1 if you have the <netdb.h> header file. */ | ||
#define HAVE_NETDB_H 1 | ||
|
||
/* Define to 1 if you have the <netinet/in.h> header file. */ | ||
#define HAVE_NETINET_IN_H 1 | ||
|
||
/* Define to 1 if you have the `select' function. */ | ||
#define HAVE_SELECT 1 | ||
|
||
/* Define to 1 if struct sockaddr_in6 has a member sin6_len. */ | ||
/* #undef HAVE_SOCKADDR_IN6_SIN6_LEN */ | ||
|
||
/* Define to 1 if you have the `socket' function. */ | ||
#define HAVE_SOCKET 1 | ||
|
||
/* Define to 1 if you have the <stddef.h> header file. */ | ||
#define HAVE_STDDEF_H 1 | ||
|
||
/* Define to 1 if you have the <stdint.h> header file. */ | ||
#define HAVE_STDINT_H 1 | ||
|
||
/* Define to 1 if you have the <stdlib.h> header file. */ | ||
#define HAVE_STDLIB_H 1 | ||
|
||
/* Define to 1 if you have the `strdup' function. */ | ||
#define HAVE_STRDUP 1 | ||
|
||
/* Define to 1 if you have the `strerror' function. */ | ||
#define HAVE_STRERROR 1 | ||
|
||
/* Define to 1 if you have the <strings.h> header file. */ | ||
#define HAVE_STRINGS_H 1 | ||
|
||
/* Define to 1 if you have the <string.h> header file. */ | ||
#define HAVE_STRING_H 1 | ||
|
||
/* Define to 1 if you have the `strnlen' function. */ | ||
#define HAVE_STRNLEN 1 | ||
|
||
/* Define to 1 if you have the <sys/param.h> header file. */ | ||
#define HAVE_SYS_PARAM_H 1 | ||
|
||
/* Define to 1 if you have the <sys/socket.h> header file. */ | ||
#ifndef HAVE_SYS_SOCKET_H | ||
#define HAVE_SYS_SOCKET_H 1 | ||
#endif | ||
|
||
/* Define to 1 if you have the <sys/stat.h> header file. */ | ||
#define HAVE_SYS_STAT_H 1 | ||
|
||
/* Define to 1 if you have the <sys/time.h> header file. */ | ||
#define HAVE_SYS_TIME_H 1 | ||
|
||
/* Define to 1 if you have the <sys/types.h> header file. */ | ||
#define HAVE_SYS_TYPES_H 1 | ||
|
||
/* Define to 1 if you have the <time.h> header file. */ | ||
#ifndef HAVE_TIME_H | ||
#define HAVE_TIME_H 1 | ||
#endif | ||
|
||
/* Define to 1 if you have the <unistd.h> header file. */ | ||
#define HAVE_UNISTD_H 1 | ||
|
||
/* Define to 1 if you have the `vprintf' function. */ | ||
#define HAVE_VPRINTF 1 | ||
|
||
/* Define to the address where bug reports for this package should be sent. */ | ||
#define PACKAGE_BUGREPORT "" | ||
|
||
/* Define to the full name of this package. */ | ||
#define PACKAGE_NAME "tinydtls" | ||
|
||
/* Define to the full name and version of this package. */ | ||
#define PACKAGE_STRING "tinydtls 0.8.6" | ||
|
||
/* Define to the one symbol short name of this package. */ | ||
#define PACKAGE_TARNAME "tinydtls" | ||
|
||
/* Define to the home page for this package. */ | ||
#define PACKAGE_URL "" | ||
|
||
/* Define to the version of this package. */ | ||
#define PACKAGE_VERSION "0.8.6" | ||
|
||
/* Define to 1 if you have the ANSI C header files. */ | ||
#define STDC_HEADERS 1 | ||
|
||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most | ||
significant byte first (like Motorola and SPARC, unlike Intel). */ | ||
#if defined AC_APPLE_UNIVERSAL_BUILD | ||
# if defined __BIG_ENDIAN__ | ||
# define WORDS_BIGENDIAN 1 | ||
# endif | ||
#else | ||
# ifndef WORDS_BIGENDIAN | ||
/* # undef WORDS_BIGENDIAN */ | ||
# endif | ||
#endif | ||
|
||
/* Define to `__inline__' or `__inline' if that's what the C compiler | ||
calls it, or to nothing if 'inline' is not supported under any name. */ | ||
#ifndef __cplusplus | ||
/* #undef inline */ | ||
#endif | ||
|
||
/* Define to `unsigned int' if <sys/types.h> does not define. */ | ||
/* #undef size_t */ | ||
|
||
#define WITH_SHA256 | ||
#define SHA2_USE_INTTYPES_H | ||
#define DTLSv12 | ||
#define DTLS_CHECK_CONTENTTYPE | ||
#define DTLS_CONSTRAINED_STACK 1 | ||
#define ESPIDF_VERSION | ||
#define DTLS_EXT_RIJNDAEL | ||
|
||
#define rijndaelEncrypt rijndaelEncrypt_dtls | ||
#define rijndaelKeySetupEnc rijndaelKeySetupEnc_dtls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.