mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
1aaec808da
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
75 lines
2.3 KiB
Plaintext
75 lines
2.3 KiB
Plaintext
menu "Example CoAP Server Configuration"
|
|
|
|
config MBEDTLS_COAP_PSK
|
|
bool "Pre-Shared Keys (PSK)"
|
|
default n
|
|
help
|
|
Use Pre-Shared Keys to encrypt the communications between the
|
|
CoAP Server and CoAP Client. Both ends need the same
|
|
Pre-Shared Key.
|
|
|
|
config COAP_PSK_KEY
|
|
string "Preshared Key (PSK) to used in the connection from the CoAP client"
|
|
depends on MBEDTLS_COAP_PSK
|
|
default "secret-key"
|
|
help
|
|
The Preshared Key to use to encrypt the communicatons. The same key must be
|
|
used at both ends of the CoAP connection, and the CoaP client must request
|
|
an URI prefixed with coaps:// instead of coap:// for DTLS to be used.
|
|
|
|
config MBEDTLS_COAP_PKI
|
|
bool "Public Key Infrastructure (PKI)"
|
|
default n
|
|
help
|
|
Use PKI Certificates and Private Keys to encrypt the communications
|
|
between the CoAP Server and CoAP Client.
|
|
|
|
config MBEDTLS_COAP_DEBUG
|
|
bool "Enable CoAP debugging"
|
|
default n
|
|
help
|
|
Enable CoAP debugging functions at compile time for the example code.
|
|
|
|
If this option is enabled, call coap_set_log_level()
|
|
at runtime in order to enable CoAP debug output via the ESP
|
|
log mechanism.
|
|
|
|
choice MBEDTLS_COAP_DEBUG_LEVEL
|
|
bool "Set CoAP debugging level"
|
|
depends on MBEDTLS_COAP_DEBUG
|
|
default COAP_LOG_WARNING
|
|
help
|
|
Set CoAP debugging level
|
|
|
|
config COAP_LOG_EMERG
|
|
bool "Emergency"
|
|
config COAP_LOG_ALERT
|
|
bool "Alert"
|
|
config COAP_LOG_CRIT
|
|
bool "Critical"
|
|
config COAP_LOG_ERROR
|
|
bool "Error"
|
|
config COAP_LOG_WARNING
|
|
bool "Warning"
|
|
config COAP_LOG_NOTICE
|
|
bool "Notice"
|
|
config COAP_LOG_INFO
|
|
bool "Info"
|
|
config COAP_LOG_DEBUG
|
|
bool "Debug"
|
|
endchoice
|
|
|
|
config COAP_LOG_DEFAULT_LEVEL
|
|
int
|
|
default 0 if !MBEDTLS_COAP_DEBUG
|
|
default 0 if COAP_LOG_EMERG
|
|
default 1 if COAP_LOG_ALERT
|
|
default 2 if COAP_LOG_CRIT
|
|
default 3 if COAP_LOG_ERROR
|
|
default 4 if COAP_LOG_WARNING
|
|
default 5 if COAP_LOG_NOTICE
|
|
default 6 if COAP_LOG_INFO
|
|
default 7 if COAP_LOG_DEBUG
|
|
|
|
endmenu
|