summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJerome Forissier <[email protected]>2025-02-04 17:00:49 +0100
committerTom Rini <[email protected]>2025-02-12 12:37:24 -0600
commita091d173e32b98fe372b5b02d4e25c81f1bc9dc1 (patch)
tree2aee5b7566dc114ee0f02c4507c94885d1eb72d2 /net
parent331d75544fc843f93275eb3767753e4a0a712a39 (diff)
net: Kconfig: depend on DM_RNG for WGET_HTTPS
net/lwip/wget.c/mbedtls_hardware_poll() is calling dm_rng_read() but dependency is not recorded anywhere that's why depend on DM_RNG when WGET_HTTPS is used. Suggested-by: Michal Simek <[email protected]> Co-developed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]> Signed-off-by: Jerome Forissier <[email protected]> Tested-by: Michal Simek <[email protected]>
Diffstat (limited to 'net')
-rw-r--r--net/lwip/wget.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/lwip/wget.c b/net/lwip/wget.c
index 9aec75f9bed..14f27d42998 100644
--- a/net/lwip/wget.c
+++ b/net/lwip/wget.c
@@ -433,10 +433,15 @@ bool wget_validate_uri(char *uri)
if (!strncmp(uri, "http://", strlen("http://"))) {
prefix_len = strlen("http://");
- } else if (!strncmp(uri, "https://", strlen("https://"))) {
- prefix_len = strlen("https://");
+ } else if (CONFIG_IS_ENABLED(WGET_HTTPS)) {
+ if (!strncmp(uri, "https://", strlen("https://"))) {
+ prefix_len = strlen("https://");
+ } else {
+ log_err("only http(s):// is supported\n");
+ return false;
+ }
} else {
- log_err("only http(s):// is supported\n");
+ log_err("only http:// is supported\n");
return false;
}