Re: rpki-client: simplify SIA parsing

2022-04-11 Thread Claudio Jeker
On Mon, Apr 11, 2022 at 11:37:11AM +0200, Theo Buehler wrote: > This should be the last step. It inlines sbgp_sia_resource_entry() into > sbgp_sia() and dedups the sbgp_sia_resource_{notify,mft,carepo}() using > a new sbgp_sia_location(). Move the GEN_URI check to sbgp_sia_location() > since that

Re: rpki-client: simplify SIA parsing

2022-04-11 Thread Theo Buehler
This should be the last step. It inlines sbgp_sia_resource_entry() into sbgp_sia() and dedups the sbgp_sia_resource_{notify,mft,carepo}() using a new sbgp_sia_location(). Move the GEN_URI check to sbgp_sia_location() since that seems cleaner. Index: cert.c

Re: rpki-client: simplify SIA parsing

2022-04-11 Thread Claudio Jeker
On Mon, Apr 11, 2022 at 09:41:05AM +0200, Theo Buehler wrote: > On Sun, Apr 10, 2022 at 12:40:08PM +0200, Claudio Jeker wrote: > > This is a lot cleaner and indeed an improvement. I think some of the rc > > handling can also be simplified. The code in sbgp_sia_resource_entry() > > and

Re: rpki-client: simplify SIA parsing

2022-04-11 Thread Theo Buehler
On Sun, Apr 10, 2022 at 12:40:08PM +0200, Claudio Jeker wrote: > This is a lot cleaner and indeed an improvement. I think some of the rc > handling can also be simplified. The code in sbgp_sia_resource_entry() > and sbgp_sia_resource() no longer require cleanup on error so we can just > return 0

Re: rpki-client: simplify SIA parsing

2022-04-10 Thread Claudio Jeker
On Tue, Apr 05, 2022 at 06:33:35PM +0200, Theo Buehler wrote: > Instead of manually unpacking the SIA extension with super low-level > ASN.1 fiddling, we can let the templated ASN.1 in libcrypto do this work > for us, which makes the code quite a bit simpler. This resolves one > FIXME and removes

rpki-client: simplify SIA parsing

2022-04-05 Thread Theo Buehler
Instead of manually unpacking the SIA extension with super low-level ASN.1 fiddling, we can let the templated ASN.1 in libcrypto do this work for us, which makes the code quite a bit simpler. This resolves one FIXME and removes one use of the magic ASN1_frame(). I kept the current split of the