History log of /openbsd-current/usr.sbin/rpki-client/output.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.33 22-Feb-2024 job

Add support for RPKI Signed Prefix Lists

Signed Prefix List are a CMS protected content type for use with the
RPKI to carry the complete list of prefixes which an Autonomous System
may originate to all or any of its routing peers. The validation of a
Signed Prefix List confirms that the holder of the listed ASN produced
the object, and that this list is a current, accurate and complete
description of address prefixes that may be announced into the routing
system originated by this AS.

https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-rpki-prefixlist

with and OK claudio@ tb@


# 1.32 03-Feb-2024 job

Refactor handling of stale manifests

No need to hoist a staleness indicator through the whole process and
count it explicitly.

OK tb@


Revision tags: OPENBSD_7_4_BASE
# 1.31 26-Apr-2023 claudio

Improve accounting by tracking things by repo and tal.
This fixes some wrong accounting for repositories that are referenced
from more than one TAL. It changes the ometric lable output a little bit
since there are repository metrics that no longer include the 'name' label.
OK tb@


# 1.30 19-Apr-2023 jsg

remove duplicate includes


Revision tags: OPENBSD_7_3_BASE
# 1.29 15-Dec-2022 claudio

Rework statistic collection to be per repository and add metric output option

Many statistic values are now accounted by repository via repo_stat_inc()
At end of the run sum_stats() accumulates these stats per TAL and globally.
The new output file metrics is written when the -m output flag is specified.
The metrics file is written in OpenMetrics format (with a few tweaks to
allow node_exporter to parse the file as well). The ometric code is a copy
from bgpctl(8) and should be kept in sync.
OK tb@


# 1.28 04-Nov-2022 tb

Add missing field initializer.

ok claudio


Revision tags: OPENBSD_7_2_BASE
# 1.27 30-Aug-2022 job

Add support for ASPA objects (draft-ietf-sidrops-aspa-profile-10)

ASPA objects are published in the RPKI and can be used to detect and
mitigate BGP route leaks. Validated ASPA Payloads are visible through
filemode (-f) and the JSON output format (-j).

With feedback from tb@

OK claudio@ tb@


# 1.26 20-Apr-2022 tb

Print UTC time with gmtime()

This replaces a strange hack that sets TZ=UTC and calls localtime().
Tweak format string to keep printing UTC.

ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.32 03-Feb-2024 job

Refactor handling of stale manifests

No need to hoist a staleness indicator through the whole process and
count it explicitly.

OK tb@


Revision tags: OPENBSD_7_4_BASE
# 1.31 26-Apr-2023 claudio

Improve accounting by tracking things by repo and tal.
This fixes some wrong accounting for repositories that are referenced
from more than one TAL. It changes the ometric lable output a little bit
since there are repository metrics that no longer include the 'name' label.
OK tb@


# 1.30 19-Apr-2023 jsg

remove duplicate includes


Revision tags: OPENBSD_7_3_BASE
# 1.29 15-Dec-2022 claudio

Rework statistic collection to be per repository and add metric output option

Many statistic values are now accounted by repository via repo_stat_inc()
At end of the run sum_stats() accumulates these stats per TAL and globally.
The new output file metrics is written when the -m output flag is specified.
The metrics file is written in OpenMetrics format (with a few tweaks to
allow node_exporter to parse the file as well). The ometric code is a copy
from bgpctl(8) and should be kept in sync.
OK tb@


# 1.28 04-Nov-2022 tb

Add missing field initializer.

ok claudio


Revision tags: OPENBSD_7_2_BASE
# 1.27 30-Aug-2022 job

Add support for ASPA objects (draft-ietf-sidrops-aspa-profile-10)

ASPA objects are published in the RPKI and can be used to detect and
mitigate BGP route leaks. Validated ASPA Payloads are visible through
filemode (-f) and the JSON output format (-j).

With feedback from tb@

OK claudio@ tb@


# 1.26 20-Apr-2022 tb

Print UTC time with gmtime()

This replaces a strange hack that sets TZ=UTC and calls localtime().
Tweak format string to keep printing UTC.

ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.31 26-Apr-2023 claudio

Improve accounting by tracking things by repo and tal.
This fixes some wrong accounting for repositories that are referenced
from more than one TAL. It changes the ometric lable output a little bit
since there are repository metrics that no longer include the 'name' label.
OK tb@


# 1.30 19-Apr-2023 jsg

remove duplicate includes


Revision tags: OPENBSD_7_3_BASE
# 1.29 15-Dec-2022 claudio

Rework statistic collection to be per repository and add metric output option

Many statistic values are now accounted by repository via repo_stat_inc()
At end of the run sum_stats() accumulates these stats per TAL and globally.
The new output file metrics is written when the -m output flag is specified.
The metrics file is written in OpenMetrics format (with a few tweaks to
allow node_exporter to parse the file as well). The ometric code is a copy
from bgpctl(8) and should be kept in sync.
OK tb@


# 1.28 04-Nov-2022 tb

Add missing field initializer.

ok claudio


Revision tags: OPENBSD_7_2_BASE
# 1.27 30-Aug-2022 job

Add support for ASPA objects (draft-ietf-sidrops-aspa-profile-10)

ASPA objects are published in the RPKI and can be used to detect and
mitigate BGP route leaks. Validated ASPA Payloads are visible through
filemode (-f) and the JSON output format (-j).

With feedback from tb@

OK claudio@ tb@


# 1.26 20-Apr-2022 tb

Print UTC time with gmtime()

This replaces a strange hack that sets TZ=UTC and calls localtime().
Tweak format string to keep printing UTC.

ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.30 19-Apr-2023 jsg

remove duplicate includes


Revision tags: OPENBSD_7_3_BASE
# 1.29 15-Dec-2022 claudio

Rework statistic collection to be per repository and add metric output option

Many statistic values are now accounted by repository via repo_stat_inc()
At end of the run sum_stats() accumulates these stats per TAL and globally.
The new output file metrics is written when the -m output flag is specified.
The metrics file is written in OpenMetrics format (with a few tweaks to
allow node_exporter to parse the file as well). The ometric code is a copy
from bgpctl(8) and should be kept in sync.
OK tb@


# 1.28 04-Nov-2022 tb

Add missing field initializer.

ok claudio


Revision tags: OPENBSD_7_2_BASE
# 1.27 30-Aug-2022 job

Add support for ASPA objects (draft-ietf-sidrops-aspa-profile-10)

ASPA objects are published in the RPKI and can be used to detect and
mitigate BGP route leaks. Validated ASPA Payloads are visible through
filemode (-f) and the JSON output format (-j).

With feedback from tb@

OK claudio@ tb@


# 1.26 20-Apr-2022 tb

Print UTC time with gmtime()

This replaces a strange hack that sets TZ=UTC and calls localtime().
Tweak format string to keep printing UTC.

ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.29 15-Dec-2022 claudio

Rework statistic collection to be per repository and add metric output option

Many statistic values are now accounted by repository via repo_stat_inc()
At end of the run sum_stats() accumulates these stats per TAL and globally.
The new output file metrics is written when the -m output flag is specified.
The metrics file is written in OpenMetrics format (with a few tweaks to
allow node_exporter to parse the file as well). The ometric code is a copy
from bgpctl(8) and should be kept in sync.
OK tb@


# 1.28 04-Nov-2022 tb

Add missing field initializer.

ok claudio


Revision tags: OPENBSD_7_2_BASE
# 1.27 30-Aug-2022 job

Add support for ASPA objects (draft-ietf-sidrops-aspa-profile-10)

ASPA objects are published in the RPKI and can be used to detect and
mitigate BGP route leaks. Validated ASPA Payloads are visible through
filemode (-f) and the JSON output format (-j).

With feedback from tb@

OK claudio@ tb@


# 1.26 20-Apr-2022 tb

Print UTC time with gmtime()

This replaces a strange hack that sets TZ=UTC and calls localtime().
Tweak format string to keep printing UTC.

ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.28 04-Nov-2022 tb

Add missing field initializer.

ok claudio


Revision tags: OPENBSD_7_2_BASE
# 1.27 30-Aug-2022 job

Add support for ASPA objects (draft-ietf-sidrops-aspa-profile-10)

ASPA objects are published in the RPKI and can be used to detect and
mitigate BGP route leaks. Validated ASPA Payloads are visible through
filemode (-f) and the JSON output format (-j).

With feedback from tb@

OK claudio@ tb@


# 1.26 20-Apr-2022 tb

Print UTC time with gmtime()

This replaces a strange hack that sets TZ=UTC and calls localtime().
Tweak format string to keep printing UTC.

ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.27 30-Aug-2022 job

Add support for ASPA objects (draft-ietf-sidrops-aspa-profile-10)

ASPA objects are published in the RPKI and can be used to detect and
mitigate BGP route leaks. Validated ASPA Payloads are visible through
filemode (-f) and the JSON output format (-j).

With feedback from tb@

OK claudio@ tb@


# 1.26 20-Apr-2022 tb

Print UTC time with gmtime()

This replaces a strange hack that sets TZ=UTC and calls localtime().
Tweak format string to keep printing UTC.

ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.26 20-Apr-2022 tb

Print UTC time with gmtime()

This replaces a strange hack that sets TZ=UTC and calls localtime().
Tweak format string to keep printing UTC.

ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.25 19-Apr-2022 claudio

Change type of talsz and dependent code from size_t to int. Tal ids are
already stored as int and and talsz is the limit for these ids.
OK tb@


Revision tags: OPENBSD_7_1_BASE
# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

branches: 1.21.2; 1.21.6;
Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.24 04-Nov-2021 claudio

Instead of passing tal descriptions around just pass a tal id and
use a small lookup table to print the description in the output path.
OK tb@


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.23 01-Nov-2021 claudio

Further simplify cert and auth handling. Move common code into auth_insert
and skip this distinction between invalid and failed certificates.
The difference between the to is getting more and more blurry.
OK tb@


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.22 11-Oct-2021 job

Add support for BGPsec Router Certificates (RFC 8209)

BGPsec router keys are extracted from RPKI certificates and
emitted via the JSON output in base64 encoded form.

OK tb@ claudio@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.21 02-Mar-2021 claudio

Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.21 02-Mar-2021 claudio

Open both the cachedir and outputdir early and use fchdir(2) to
switch between the two.
OK deraadt@ job@


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.20 18-Feb-2021 claudio

All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.19 09-Dec-2020 claudio

Validate ghostbuster records (RFC 6493) but for now do nothing with the
provided vcard payload. This change verifies the certificate of the .gbr
file and makes sure it is valid (like we do for e.g. .roa files).
OK job@


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.18 06-Nov-2020 tb

8 spaces -> tab


Revision tags: OPENBSD_6_8_BASE
# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.17 12-Sep-2020 claudio

Include openssl/x509.h in extern.h since it uses a few of the typedefs from
there in structs and prototypes. Remove the openssl/ssl.h and other strange
openssl includes in the .c files that don't use openssl specific functions.
OK beck@ and tb@


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.16 14-May-2020 job

be little bit more verbose what went wrong in mkostemp


Revision tags: OPENBSD_6_7_BASE
# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.15 03-May-2020 deraadt

Use strftime() rather than ctime() to generate timestamps nicer.
ok job, input claudio benno


# 1.14 03-May-2020 deraadt

Make it clear the date is in UTC.
ok job


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.13 30-Apr-2020 deraadt

Place elapsed, user, and system time for processing in the comment headers.
ok job benno claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.12 28-Apr-2020 deraadt

re-organize statistics printing code, to make it less verbose and
more readable.


# 1.11 28-Apr-2020 deraadt

Print statistics as comments at the top of the files which can take
comments.
ok claudio job


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.10 11-Apr-2020 benno

remove a __unused attribute, it's obvious and complicates things.
ok claudio@


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.9 10-Mar-2020 jca

Narrow the visibility of some functions and variables local to output.c

Also make the outputs table const.
Based on a suggestion from claudio@, ok deraadt@ claudio@


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.8 09-Mar-2020 jca

Ensure that we properly flush, close and rename temporary output files

Makes sure we don't feed an incomplete/garbage file to consumers.
Input and ok claudio@ deraadt@


# 1.7 09-Mar-2020 jca

logx->warn, we want to know why operations on output files failed

ok claudio@ deraadt@


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.6 06-Mar-2020 benno

generate 3 different outputs for BIRD:
- bird v1 with IPv4 routes
- bird v1 with IPv6 routes
- bird v2
when using command line option -B.
BIRD v2 output from Robert Scheck, robert AT fedoraproject DOT org
time_t cast hint from jca@, and tested by job@
ok deraadt@ claudio@


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.5 19-Dec-2019 claudio

Fix output loop to not stop when the first unused output format is
encountered. Fixes rpki-client -j which did not produce any output before.
Found by and OK job@


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.4 06-Dec-2019 claudio

Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not
started as root users need to provide both directories as arguments.
While there switch from absolute path names to relative ones. For this
the parser and rsync process do a chdir(2) to the cache directory on startup.
OK benno@


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio


# 1.3 04-Dec-2019 benno

use return x; instead of return (x);, like all other files here.
ok deraadt@


# 1.2 04-Dec-2019 benno

reduce includes to the required minimum.
ok deraadt@


# 1.1 04-Dec-2019 deraadt

split output management code into seperate file. iterate over output
methods using a table. detect output truncation (for instance filesystem
full) and don't overwrite previous output
ok claudio