1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/suit: accept coaps:// URLs

This commit is contained in:
Benjamin Valentin 2022-11-30 10:46:30 +01:00
parent 8379bb7d4a
commit 4f576285bb
2 changed files with 4 additions and 2 deletions

View File

@ -438,7 +438,8 @@ static int _dtv_fetch(suit_manifest_t *manifest, int key,
if (0) {}
#ifdef MODULE_SUIT_TRANSPORT_COAP
else if (strncmp(manifest->urlbuf, "coap://", 7) == 0) {
else if ((strncmp(manifest->urlbuf, "coap://", 7) == 0) ||
(IS_USED(MODULE_NANOCOAP_DTLS) && strncmp(manifest->urlbuf, "coaps://", 8) == 0)) {
res = nanocoap_get_blockwise_url(manifest->urlbuf, CONFIG_SUIT_COAP_BLOCKSIZE,
_storage_helper,
manifest);

View File

@ -87,7 +87,8 @@ int suit_handle_url(const char *url)
if (0) {}
#ifdef MODULE_SUIT_TRANSPORT_COAP
else if (strncmp(url, "coap://", 7) == 0) {
else if ((strncmp(url, "coap://", 7) == 0) ||
(IS_USED(MODULE_NANOCOAP_DTLS) && strncmp(url, "coaps://", 8) == 0)) {
size = nanocoap_get_blockwise_url_to_buf(url,
CONFIG_SUIT_COAP_BLOCKSIZE,
_manifest_buf,