Re: rpki-client cleanup valid_cert and valid_roa

2022-01-22 Thread Theo Buehler
On Sat, Jan 22, 2022 at 07:08:12PM +0100, Claudio Jeker wrote: > On Sat, Jan 22, 2022 at 02:21:23PM +0100, Theo Buehler wrote: > > On Sat, Jan 22, 2022 at 12:42:30PM +0100, Theo Buehler wrote: > > > On Sat, Jan 22, 2022 at 11:47:17AM +0100, Claudio Jeker wrote: > > > > The valid_cert() and valid_ro

Re: rpki-client cleanup valid_cert and valid_roa

2022-01-22 Thread Claudio Jeker
On Sat, Jan 22, 2022 at 02:21:23PM +0100, Theo Buehler wrote: > On Sat, Jan 22, 2022 at 12:42:30PM +0100, Theo Buehler wrote: > > On Sat, Jan 22, 2022 at 11:47:17AM +0100, Claudio Jeker wrote: > > > The valid_cert() and valid_roa() functions both redo the valid_aki_ski() > > > call that the callee

Re: rpki-client cleanup valid_cert and valid_roa

2022-01-22 Thread Theo Buehler
On Sat, Jan 22, 2022 at 12:42:30PM +0100, Theo Buehler wrote: > On Sat, Jan 22, 2022 at 11:47:17AM +0100, Claudio Jeker wrote: > > The valid_cert() and valid_roa() functions both redo the valid_aki_ski() > > call that the callee already did. Adjust the functions and skip this > > redundant call. Al

Re: rpki-client cleanup valid_cert and valid_roa

2022-01-22 Thread Theo Buehler
On Sat, Jan 22, 2022 at 11:47:17AM +0100, Claudio Jeker wrote: > The valid_cert() and valid_roa() functions both redo the valid_aki_ski() > call that the callee already did. Adjust the functions and skip this > redundant call. Also move the place where we set the talid for roa to a > better place.

rpki-client cleanup valid_cert and valid_roa

2022-01-22 Thread Claudio Jeker
The valid_cert() and valid_roa() functions both redo the valid_aki_ski() call that the callee already did. Adjust the functions and skip this redundant call. Also move the place where we set the talid for roa to a better place. With RFC3779 support in LibreSSL these functions no longer trigger sin

more rpki-client cleanup

2021-12-21 Thread Claudio Jeker
In the roa parser the handling of maxlen is overly complex. Just set maxlen to addr.prefixlen before parsing the maxlength option. If present it will override maxlen with the new value and with that the ternary confusion at the end can be removed. -- :wq Claudio Index: roa.c

Re: rpki-client cleanup poll loop

2021-03-26 Thread Claudio Jeker
On Fri, Mar 26, 2021 at 10:37:27AM +0100, Theo Buehler wrote: > On Fri, Mar 26, 2021 at 09:52:04AM +0100, Claudio Jeker wrote: > > This diff replaces mostly the same code in the poll loop with a for loop. > > It also gives a hint which process closed a connection. > > This is much nicer. Would the

Re: rpki-client cleanup poll loop

2021-03-26 Thread Theo Buehler
On Fri, Mar 26, 2021 at 09:52:04AM +0100, Claudio Jeker wrote: > This diff replaces mostly the same code in the poll loop with a for loop. > It also gives a hint which process closed a connection. This is much nicer. Would the msgbuf_write() errors not benefit from the same hint? ok tb > > --

rpki-client cleanup poll loop

2021-03-26 Thread Claudio Jeker
This diff replaces mostly the same code in the poll loop with a for loop. It also gives a hint which process closed a connection. -- :wq Claudio Index: main.c === RCS file: /cvs/src/usr.sbin/rpki-client/main.c,v retrieving revision

Re: rpki-client cleanup

2021-03-18 Thread Theo Buehler
On Thu, Mar 18, 2021 at 11:25:25AM +0100, Claudio Jeker wrote: > This diff aims at removing some warnings seen in -portable. > > - gcc has a hard time to realize when a variable like noop ensures that > an other variable is not used. > > - Similar the switch () statements in http.c include all po

rpki-client cleanup

2021-03-18 Thread Claudio Jeker
This diff aims at removing some warnings seen in -portable. - gcc has a hard time to realize when a variable like noop ensures that an other variable is not used. - Similar the switch () statements in http.c include all possible enums but gcc warns about control reaches end of non-void function.

Re: rpki-client cleanup

2020-10-23 Thread Theo Buehler
On Fri, Oct 23, 2020 at 03:49:23PM +0200, Claudio Jeker wrote: > This diff reduces the number of rsync_uri_parse() calls to one. > > The cert parser just checks for rsync:// and a file extension of .mft. > This is done similar to the way the notification URL is checked and is > streight forward. >

rpki-client cleanup

2020-10-23 Thread Claudio Jeker
This diff reduces the number of rsync_uri_parse() calls to one. The cert parser just checks for rsync:// and a file extension of .mft. This is done similar to the way the notification URL is checked and is streight forward. Additonally all the extra check for RTYPE_MFT / RTYPE_CERT in the main pr

Re: rpki-client cleanup includes

2020-09-12 Thread Bob Beck
ok beck@ On Sat, Sep 12, 2020 at 05:42:39PM +0200, Claudio Jeker wrote: > extern.h uses stuff from openssl/x509.h so put that include in there > and remove all the various other openssl includes in other files that > actually don't need x509 functions. > > -- > :wq Claudio > > Index: as.c > =

rpki-client cleanup includes

2020-09-12 Thread Claudio Jeker
extern.h uses stuff from openssl/x509.h so put that include in there and remove all the various other openssl includes in other files that actually don't need x509 functions. -- :wq Claudio Index: as.c === RCS file: /cvs/src/usr.sbi