HDTN
HDTN copied to clipboard
BPSec blocks cannot have multiple results per target
The current definition of Bpv7AbstractSecurityBlock::security_results_t
is defined to be a single vector of type-value pairs, which then gets encoded so that each target corresponds with a length-1 array of results per target. This restriction to allow only a single result type-value pair per target is artificial and not part of RFC 9172.
https://github.com/nasa/HDTN/blob/5159736b9e3feb77681a807a5629d222364d94c4/common/bpcodec/include/codec/bpv7.h#L506
A more correct definition would be that the results are more like
typedef std::vector<id_value_pairs_vec_t>> security_results_t;
where each outer vector element corresponds with a single target, and the inner vector contains all results for that target block.
This will require implementation changes for serializing, deserializing, and comparing result sets so I'm not attempting a patch here.