esp_local_ctrl: Added documentation to chose protocom security

Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
pull/7497/head
Vikram Dattu 2021-08-26 10:53:37 +05:30 zatwierdzone przez bot
rodzic 5691c9a8e8
commit 5c41f98942
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -24,6 +24,11 @@ Initialization of the **esp_local_ctrl** service over BLE transport is performed
}
}
},
.proto_sec = {
.version = PROTOCOM_SEC0,
.custom_handle = NULL,
.pop = NULL,
},
.handlers = {
/* User defined handler functions */
.get_prop_values = get_property_values,
@ -65,6 +70,11 @@ Similarly for HTTPS transport:
.transport_config = {
.httpd = &https_conf
},
.proto_sec = {
.version = PROTOCOM_SEC0,
.custom_handle = NULL,
.pop = NULL,
},
.handlers = {
/* User defined handler functions */
.get_prop_values = get_property_values,
@ -79,6 +89,11 @@ Similarly for HTTPS transport:
/* Start esp_local_ctrl service */
ESP_ERROR_CHECK(esp_local_ctrl_start(&config));
You may set security for transport in ESP local control using following options:
1. `PROTOCOM_SEC1`: specifies that end to end encryption is used.
2. `PROTOCOM_SEC0`: specifies that data will be exchanged as a plain text.
3. `PROTOCOM_SEC_CUSTOM`: you can define your own security requirement. Please note that you will also have to provide `custom_handle` of type `protocomm_security_t *` in this context.
Creating a property
-------------------