]> granicus.if.org Git - esp-idf/commit
Add DTLS support to libcoap using MbedTLS
authorJon Shallow <supjps-libcoap@jpshallow.com>
Sat, 13 Apr 2019 11:15:28 +0000 (12:15 +0100)
committerMahavir Jain <mahavir@espressif.com>
Tue, 6 Aug 2019 05:07:40 +0000 (10:37 +0530)
commit1aaec808da079e5d5ad887e6973bbe3505456924
tree561fa8e68efa0a5dcfe4109ad6a5a50f90cee93a
parent39f090a4f1dee4e325f8109d880bf3627034d839
Add DTLS support to libcoap using MbedTLS

This update supports DTLS, TLS is a future TODO

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_mbedtls.c

components/coap/libcoap:

Update the version to include the current version for supporting MbedTLS

components/coap/port/coap_debug.c:
components/coap/port/coap_mbedtls.c:
components/coap/port/include/coap/coap_dtls.h:

New port files for DTLS

components/coap/port/include/coap_config_posix.h:

Include building with MbedTLS

examples/protocols/coap_client/README.md:
examples/protocols/coap_client/main/CMakeLists.txt:
examples/protocols/coap_client/main/Kconfig.projbuild:
examples/protocols/coap_client/main/coap_client_example_main.c:
examples/protocols/coap_client/main/component.mk:

Update CoAP client to support DTLS

examples/protocols/coap_client/main/coap_ca.pem
examples/protocols/coap_client/main/coap_client.crt
examples/protocols/coap_client/main/coap_client.key

New PKI Certs for CoAP client (copied from wpa2_enterprise example)

examples/protocols/coap_server/README.md:
examples/protocols/coap_server/main/CMakeLists.txt:
examples/protocols/coap_server/main/Kconfig.projbuild:
examples/protocols/coap_server/main/coap_server_example_main.c:
examples/protocols/coap_server/main/component.mk:

Update CoAP server to support DTLS
Change "no data" to "Hello World!" to prevent confusion

examples/protocols/coap_server/main/coap_ca.pem
examples/protocols/coap_server/main/coap_server.crt
examples/protocols/coap_server/main/coap_server.key

New PKI Certs for CoAP server (copied from wpa2_enterprise example)

Closes https://github.com/espressif/esp-idf/pull/3345
Closes https://github.com/espressif/esp-idf/issues/1379
26 files changed:
components/coap/CMakeLists.txt
components/coap/component.mk
components/coap/libcoap
components/coap/port/coap_debug.c [new file with mode: 0644]
components/coap/port/coap_io.c [deleted file]
components/coap/port/coap_mbedtls.c [new file with mode: 0644]
components/coap/port/include/coap/coap_dtls.h [new file with mode: 0644]
components/coap/port/include/coap_config_posix.h
components/mbedtls/CMakeLists.txt
components/mbedtls/port/esp_timing.c [new file with mode: 0644]
examples/protocols/coap_client/README.md
examples/protocols/coap_client/main/CMakeLists.txt
examples/protocols/coap_client/main/Kconfig.projbuild
examples/protocols/coap_client/main/coap_ca.pem [new file with mode: 0644]
examples/protocols/coap_client/main/coap_client.crt [new file with mode: 0644]
examples/protocols/coap_client/main/coap_client.key [new file with mode: 0644]
examples/protocols/coap_client/main/coap_client_example_main.c
examples/protocols/coap_client/main/component.mk
examples/protocols/coap_server/README.md
examples/protocols/coap_server/main/CMakeLists.txt
examples/protocols/coap_server/main/Kconfig.projbuild [new file with mode: 0644]
examples/protocols/coap_server/main/coap_ca.pem [new file with mode: 0644]
examples/protocols/coap_server/main/coap_server.crt [new file with mode: 0644]
examples/protocols/coap_server/main/coap_server.key [new file with mode: 0644]
examples/protocols/coap_server/main/coap_server_example_main.c
examples/protocols/coap_server/main/component.mk