Simplify as_id_parse() using ASN1_INTEGER_get_uint64()
authortb <tb@openbsd.org>
Tue, 23 May 2023 06:39:31 +0000 (06:39 +0000)
committertb <tb@openbsd.org>
Tue, 23 May 2023 06:39:31 +0000 (06:39 +0000)
commit2cdc38ed5f3539c72becbe6f56b47071eda59c69
tree5f7b82b8fc2757128b03535a897b6c70c5c533f1
parentf6b8ea6e542ee6dbcfd275d61cfc47a2dcfb66c6
Simplify as_id_parse() using ASN1_INTEGER_get_uint64()

Instead of decoding an ASN1_INTEGER by hand because ASN1_INTEGER_get()
is broken by design and would report an error on LP32 architectures for
the reserved ASid UINT32_MAX, we can simplify this ugliness and use the
ASN1_INTEGER_get_uint64() API, available since LibreSSL 3.6.

ok claudio
usr.sbin/rpki-client/as.c