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>
diff --git a/net/lwip/wget.c b/net/lwip/wget.c
index 9aec75f..14f27d4 100644
--- a/net/lwip/wget.c
+++ b/net/lwip/wget.c
@@ -433,10 +433,15 @@
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;
}