diff --git a/sys/include/suit.h b/sys/include/suit.h index 6a7a09078d4a..008b8c4db5ef 100644 --- a/sys/include/suit.h +++ b/sys/include/suit.h @@ -62,13 +62,6 @@ extern "C" { #define CONFIG_SUIT_COMPONENT_MAX_NAME_LEN (32U) #endif -/** - * @brief Maximum length of a SUIT resource URL - */ -#ifndef SUIT_URL_MAX -#define SUIT_URL_MAX 128 -#endif - /** * @brief Current SUIT serialization format version * diff --git a/sys/suit/transport/coap.c b/sys/suit/transport/coap.c index 4be72700ab5f..8ed74793d0f5 100644 --- a/sys/suit/transport/coap.c +++ b/sys/suit/transport/coap.c @@ -47,7 +47,7 @@ static ssize_t _trigger_handler(coap_pkt_t *pkt, uint8_t *buf, size_t len, unsigned code; size_t payload_len = pkt->payload_len; if (payload_len) { - if (payload_len >= SUIT_URL_MAX) { + if (payload_len >= CONFIG_SOCK_URLPATH_MAXLEN) { code = COAP_CODE_REQUEST_ENTITY_TOO_LARGE; } else { diff --git a/sys/suit/transport/worker.c b/sys/suit/transport/worker.c index 26d101e20048..1614ac368df0 100644 --- a/sys/suit/transport/worker.c +++ b/sys/suit/transport/worker.c @@ -74,7 +74,7 @@ #define SUIT_MSG_TRIGGER 0x12345 static char _stack[SUIT_WORKER_STACKSIZE]; -static char _url[SUIT_URL_MAX]; +static char _url[CONFIG_SOCK_URLPATH_MAXLEN]; static uint8_t _manifest_buf[SUIT_MANIFEST_BUFSIZE]; static kernel_pid_t _suit_worker_pid; @@ -111,7 +111,7 @@ static void _suit_handle_url(const char *url) memset(&manifest, 0, sizeof(manifest)); manifest.urlbuf = _url; - manifest.urlbuf_len = SUIT_URL_MAX; + manifest.urlbuf_len = CONFIG_SOCK_URLPATH_MAXLEN; int res; if ((res = suit_parse(&manifest, _manifest_buf, size)) != SUIT_OK) { diff --git a/tests/suit_manifest/main.c b/tests/suit_manifest/main.c index c0de3628d7b9..4dabb0eea260 100644 --- a/tests/suit_manifest/main.c +++ b/tests/suit_manifest/main.c @@ -38,7 +38,6 @@ #include TEST_MANIFEST_INCLUDE(file1.bin.h) #include TEST_MANIFEST_INCLUDE(file2.bin.h) -#define SUIT_URL_MAX 128 typedef struct { const unsigned char *data; @@ -73,13 +72,13 @@ const size_t num_payloads = ARRAY_SIZE(payloads); static int test_suit_manifest(const unsigned char *manifest_bin, size_t manifest_bin_len) { - char _url[SUIT_URL_MAX]; + char _url[CONFIG_SOCK_URLPATH_MAXLEN]; suit_manifest_t manifest; memset(&manifest, 0, sizeof(manifest)); manifest.urlbuf = _url; - manifest.urlbuf_len = SUIT_URL_MAX; + manifest.urlbuf_len = CONFIG_SOCK_URLPATH_MAXLEN; int res; if ((res =