Add function to determine the file type from the file name extension
authortb <tb@openbsd.org>
Fri, 21 Jan 2022 18:49:44 +0000 (18:49 +0000)
committertb <tb@openbsd.org>
Fri, 21 Jan 2022 18:49:44 +0000 (18:49 +0000)
commit22cec6c4dff03086885f7951780dc92909e3cecc
tree18051100d3a392d948099e880888e8ae32168e68
parent980b3c0cdff9db7c4945efad17115cdf0a63c3f5
Add function to determine the file type from the file name extension

rpki-client uses the same idiom to determine the file type in too many
places. Use one function that determines the appropriate RTYPE from the
file name. Add that type to struct mftfile and use this new member to
simplify queue_add_from_mft*().

input/ok claudio
usr.sbin/rpki-client/extern.h
usr.sbin/rpki-client/main.c
usr.sbin/rpki-client/mft.c
usr.sbin/rpki-client/parser.c
usr.sbin/rpki-client/validate.c