fix(esp-tls): Use runtime assignment for static key config length in examples

Linker symbol differences (prvtkey_pem_end - prvtkey_pem_start) are not
compile-time constants and cannot be used in static initializers.
This commit is contained in:
Aditya Patwardhan
2026-04-09 17:14:41 +05:30
parent 37808e2386
commit 4196734d1a
3 changed files with 3 additions and 3 deletions

View File

@@ -211,9 +211,9 @@ static httpd_handle_t start_webserver(void)
.source = ESP_KEY_SOURCE_BUFFER,
.buffer = {
.data = prvtkey_pem_start,
.len = prvtkey_pem_end - prvtkey_pem_start,
}
};
server_key.buffer.len = prvtkey_pem_end - prvtkey_pem_start;
conf.server_key = &server_key;
#if CONFIG_EXAMPLE_ENABLE_HTTPS_SERVER_CUSTOM_CIPHERSUITES