Revert "httpd: convert imsg handling to imsg_get_ and remove... " r.1.79
It looks like having multiple "listen" blocks can cause configuration
errors because the IMSG has already been consumed. The previous behavior
simply copied the IMSG.
To be on the safe side, revert all IMSG changes.
Spotted by aja, hint by tb@
rpki-client: guard JSON output of ca->aki with a NULL check
While this is about non-functional CAs and TAs are never considered as
such, this block may well be copied around and then end in tears.
discussed with claudio
Add safegaurd: only consider intermediates when storing NCA state on disk
The detection & backoff related to non-functional CAs is only intended to
apply to intermediates (not the trust anchor or end-entity certs). Better
to explicitly check the ca's purpose.
OK tb@
Add safe guard: don't initially mark trust anchors as nonfunctional CAs
The detection & backoff for non-functional CAs is only intended to apply
to intermediates, not the trust anchor itself.
OK tb@
Pinning the validation time implies offline mode
The -P option is merely intended to help research whether the
deterministic validation process produces expected results. The only
scenario where use of -P is productive is in offline mode.
OK tb@ claudio@
In offline mode don't consider state related to non-functional CAs
If '-n' is specified there won't be any network synchronisation anyway.
This help avoid nuking the on-disk state in some scenarios.
OK tb@
x509_verify: cache extensions before allocating chain
Avoid allocating current_chain before extension caching can fail, so the
failure path needs no chain cleanup.
Drop the misleading OUT_OF_MEM error assignment. The common error path
supplies UNSPECIFIED.
pointed out by tb@
ok tb@ beck@
privdrop to _ypbind. The late use of daemon() until YP binding succeeds
(to wait in the rc script, but also allow ^C if the admin wants to fix
a mess) was a problem. Now it opens a pipe[], forks the parent which
does half of daemon up front, the remaining parts happen upon binding
success. If the parent gets tty signals, it must forward to the child
who has already called setsid(). unveils and pledges have been moved around.
tested by jmatthew
uhidev: the report size when doing USB_GET_REPORT could exceed the size
of ucr_data. Check that report size doesn't exceed ucr_data, preventing
heap overflow. Also for USB_SET_REPORT.
From Acts1631
"looks correct" deraadt@