From: Alberto Leiva Popper Date: Thu, 5 Oct 2023 00:22:34 +0000 (-0600) Subject: Fix global to local URI mapping on manifest entries X-Git-Tag: 1.6.0~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1ac4056c9a7f73c1f9992a328f210143725a93d;p=thirdparty%2FFORT-validator.git Fix global to local URI mapping on manifest entries Straightforward bug; was neither downloading to the intended location nor attempting to locate the file there afterwards. --- diff --git a/src/types/uri.c b/src/types/uri.c index dd688526..7776b1a1 100644 --- a/src/types/uri.c +++ b/src/types/uri.c @@ -341,9 +341,7 @@ map_caged(struct rpki_uri *uri) if (notification == NULL) pr_crit("Programming error: Notification not recorded."); - pb_init(&pb); - - error = pb_append(&pb, "rrdp"); + error = pb_init_cache(&pb, "rrdp"); if (error) return error; error = append_guri(&pb, notification->global, "https://", ENOTHTTPS, true); @@ -430,7 +428,9 @@ uri_create_mft(struct rpki_uri **result, struct rpki_uri *mft, IA5String_t *ia5) return error; } - uri->type = UT_RSYNC; + uri->type = (validation_get_notification_uri(state_retrieve()) == NULL) + ? UT_RSYNC + : UT_CAGED; error = autocomplete_local(uri); if (error) {