diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2025-02-04 17:00:49 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-02-12 12:37:24 -0600 |
commit | a091d173e32b98fe372b5b02d4e25c81f1bc9dc1 (patch) | |
tree | 2aee5b7566dc114ee0f02c4507c94885d1eb72d2 | |
parent | 331d75544fc843f93275eb3767753e4a0a712a39 (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 <michal.simek@amd.com>
Co-developed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
-rw-r--r-- | cmd/Kconfig | 1 | ||||
-rw-r--r-- | net/lwip/wget.c | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 1f9b26928c4..a04fcaa0e08 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2161,6 +2161,7 @@ config WGET_HTTPS depends on CMD_WGET depends on PROT_TCP_LWIP depends on MBEDTLS_LIB + depends on DM_RNG select SHA256 select RSA select ASYMMETRIC_KEY_TYPE 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; } |