Skip to content

Commit 67cefd6

Browse files
committed
led_light: Use default OTA server certificate
Earlier example used a local certificate just for demo purposes. However, since the RainMaker OTA server is the default server anyways, it's better to use that same default certificate.
1 parent 174a38b commit 67cefd6

File tree

3 files changed

+1
-33
lines changed

3 files changed

+1
-33
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
idf_component_register(SRCS ./app_driver.c ./app_main.c
22
INCLUDE_DIRS ".")
3-
4-
target_add_binary_data(${COMPONENT_TARGET} "server.crt" TEXT)

examples/led_light/main/app_main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ static const char *TAG = "app_main";
2929

3030
esp_rmaker_device_t *light_device;
3131

32-
extern const char ota_server_cert[] asm("_binary_server_crt_start");
33-
3432
/* Callback to handle commands received from the RainMaker cloud */
3533
static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param,
3634
const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx)
@@ -108,7 +106,7 @@ void app_main()
108106

109107
/* Enable OTA */
110108
esp_rmaker_ota_config_t ota_config = {
111-
.server_cert = ota_server_cert,
109+
.server_cert = ESP_RMAKER_OTA_DEFAULT_SERVER_CERT,
112110
};
113111
esp_rmaker_ota_enable(&ota_config, OTA_USING_PARAMS);
114112

examples/led_light/main/server.crt

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)