rpki-client: replace XXX comments with a short explanation
For aspa, roa, rsc, and spl, we always return 1 from sobj->validate(),
which I marked with an XXX since it confused me. One reason for this is
that in normal mode we send the object to the main process for accounting
and insertion into the vap/vrp/vsp trees if valid. In filemode invalid
objects still get some info printed this way.
The parser process depends on invalid MFTs failing signed_object_parse()
at the moment, so this should stay this way, at least for now. No idea
whether it is deliberate or by accident that TAKs are the way they are.
ok claudio
rpki-client: remove a call to x509_any_inherits()
After checking that there are no IP resources and that there is exactly
one non-inheriting AS resource, there is no need to check that there are
no inheriting resources.
ok claudio
in mbuf pkt headers we have m_pkthdr.pf.tag, that is for users (tag/tagged
in rulesets). we also have m_pkthdr.pf.flags, that is for pf's internal
needs. having the defines that go into m_pkthdr.pf.flags named PF_TAG_*
is confusing.
mechanically rename PF_TAG_* (except PF_TAG_NAME_SIZE, which actually is
for the tags in m_pkthdr.pf.tag) to PF_FLAG_*
ok sashan & compiler
rpki-client: switch ASPA econtent parsing to CBS
ASPAs have a rather simple eContent and the existing parser can pretty
much stay as it is. After this change the only remaining OpenSSL type
that is directly used in aspa.c is the ASN1_OBJECT for the aspa_oid.
The main side effect is that the parser now enforces DER encoding.
Factor parsing of version and customerASID into helpers and rework the
existing providers parser to use a CBS. Since we no longer have STACK_OF,
we need to add an extra loop to count the number of providers other than
that not a lot needs to change. We only need one allocation now, one for
the array of providers.
with/ok claudio
rpki-client: add helper to parse econtent version
All RPKI signed objects have an econtent version with default 0:
version [0] INTEGER DEFAULT 0,
add a helper to parse this from a CBS since this is going to be needed
for every econtent parser.
ok claudio