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