djm [Sat, 3 Apr 2021 05:28:43 +0000 (05:28 +0000)]
unused variable
djm [Sat, 3 Apr 2021 05:21:46 +0000 (05:21 +0000)]
Fix two problems in string->argv conversion: 1) multiple backslashes
were not being dequoted correctly and 2) quoted space in the middle
of a string was being incorrectly split.
A unit test for these cases has already been committed
prompted by and based on GHPR#223 by Eero Häkkinen; ok markus@
dv [Fri, 2 Apr 2021 19:07:18 +0000 (19:07 +0000)]
Remove superflouus mmcpy()
Reported by Preben Guldberg. ok mlarkin@
claudio [Fri, 2 Apr 2021 17:10:12 +0000 (17:10 +0000)]
In http_connect() if the connect was actually successful break out of the
for loop. Also in http_finish_connect() if the connect was successful
cleanup the addrinfo struct. It is no longer needed.
Found with deraadt@
deraadt [Fri, 2 Apr 2021 16:41:36 +0000 (16:41 +0000)]
info gotten via getnameinfo in http_connect() is not used anymore, it is
old debugging gunk
ok claudio
otto [Fri, 2 Apr 2021 14:20:57 +0000 (14:20 +0000)]
Two cases of BRE involving counts and backrefs that go wrong and
similar that have no isssues. Reported by Michael Paoli. Failing
cases commented out for now.
claudio [Fri, 2 Apr 2021 11:35:05 +0000 (11:35 +0000)]
Include the default cert.pem file path in tls_load_file error message.
Should help for -portable where sometimes the cert.pem is missing.
inoguchi [Fri, 2 Apr 2021 10:19:19 +0000 (10:19 +0000)]
Show DTLS1.2 message with openssl(1) s_server and s_client
ok jsing@ tb@
tb [Fri, 2 Apr 2021 08:07:47 +0000 (08:07 +0000)]
Don't leak the uri of a delta with duplicate serial.
ok claudio deraadt
eric [Fri, 2 Apr 2021 07:00:30 +0000 (07:00 +0000)]
swap rname and mname in debug output, and handle the USE_CD flag
from Boudewijn Dijkstra
florian [Fri, 2 Apr 2021 06:44:24 +0000 (06:44 +0000)]
configyyrename.h is no longer needed with the switch to flex -P c_.
This was also removed upstream.
OK sthen
florian [Fri, 2 Apr 2021 06:37:40 +0000 (06:37 +0000)]
Implement ZONEMD (RFC8976), based on DS (ds_43.c)
OK sthen
eric [Fri, 2 Apr 2021 06:30:55 +0000 (06:30 +0000)]
if cipher list is not specified for a relay action, use the global
cipher list if defined. otherwise fallback to libtls default.
ok millert@
jmc [Fri, 2 Apr 2021 06:11:01 +0000 (06:11 +0000)]
fix sentence structure;
jmc [Fri, 2 Apr 2021 06:09:44 +0000 (06:09 +0000)]
tweak previous;
tb [Fri, 2 Apr 2021 05:16:29 +0000 (05:16 +0000)]
fix typo + some whitespace
tb [Fri, 2 Apr 2021 03:02:45 +0000 (03:02 +0000)]
Fix Dale's email address
ok drahn
deraadt [Fri, 2 Apr 2021 02:30:29 +0000 (02:30 +0000)]
sync
deraadt [Fri, 2 Apr 2021 02:29:54 +0000 (02:29 +0000)]
don't put ptys onto the ramdisk media
from miod
tb [Fri, 2 Apr 2021 02:20:17 +0000 (02:20 +0000)]
Indent struct members like everywhere else.
dv [Fri, 2 Apr 2021 01:56:20 +0000 (01:56 +0000)]
Document ioctl(2)'s for vmm(4). OK kn@.
job [Thu, 1 Apr 2021 17:43:11 +0000 (17:43 +0000)]
Update manpage about RRDP
OK claudio@
jmc [Thu, 1 Apr 2021 16:59:57 +0000 (16:59 +0000)]
update currency exchange rates;
jmc [Thu, 1 Apr 2021 16:58:56 +0000 (16:58 +0000)]
sort options list;
deraadt [Thu, 1 Apr 2021 16:50:23 +0000 (16:50 +0000)]
spelling
tb [Thu, 1 Apr 2021 16:40:05 +0000 (16:40 +0000)]
Sort usage: rR -> Rr
claudio [Thu, 1 Apr 2021 16:16:44 +0000 (16:16 +0000)]
RRDP is currently off by default.
krw [Thu, 1 Apr 2021 16:07:44 +0000 (16:07 +0000)]
Tweak log_debug() verbiage to reduce repetitive info
(ACK/NAK), add details (DISCOVER/REQUEST) and provide
before/after info for SSID/LLADDR/MTU changes.
claudio [Thu, 1 Apr 2021 16:04:48 +0000 (16:04 +0000)]
Initial commit of RRDP (The RPKI Repository Delta Protocol - RFC8182) support
in rpki-client. For now it is off by default.
All XML processing is done in its own process with minimal pledge rights.
It uses the already present https process to fetch the xml files and uses
the master porcess to handle the file IO into the repositories.
RRDP data is stored in the cache under ./rrdp/ and the first directory
is the SHA256 hash of the notify URI.
Fetching snapshots and deltas works to bring the cache up to date.
If something goes wrong rpki-client will fall back to rsync.
RRDP was implemented by Nils Fisher and integrated into rpki-client by myself.
"Time to get it in" deraadt@
deraadt [Thu, 1 Apr 2021 14:27:47 +0000 (14:27 +0000)]
For the snprintf range check demo, add a (size_t) cast in the right place
which will satisfy the toughest compiler options
krw [Thu, 1 Apr 2021 13:17:48 +0000 (13:17 +0000)]
Also immediately accept the *first* OFFER if it matches the requested address,
rather than waiting for select_timeout to expire before accepting the same
OFFER.
kn [Thu, 1 Apr 2021 12:06:00 +0000 (12:06 +0000)]
Clean up nonexistent/unused properties handling
Never used since import and probably just ported over from NetBSD as-is;
"design-capacity" does not exist in the device tree binding.
"monitor-interval-ms" defaults to 250ms as per binding and could be used
in the sensor_task_register() call, but our framework only supports whole
seconds and there's no advantage over our current fixed poll interval of 5s.
OK patrick
dv [Thu, 1 Apr 2021 11:05:47 +0000 (11:05 +0000)]
Remove extraneous call of vm_getbyvmid during pause event
The vm is already being assigned by a call in the if-condition.
job [Thu, 1 Apr 2021 11:04:30 +0000 (11:04 +0000)]
Abate superfluous lines from remote servers
OK claudio@
inoguchi [Thu, 1 Apr 2021 10:47:38 +0000 (10:47 +0000)]
Compare the pointer variable explicitly with NULL in if condition
kn [Thu, 1 Apr 2021 10:34:21 +0000 (10:34 +0000)]
Hardcode meaningful alert level, track apm's battery state better
The current code looks for the nonexistent "cellwise,alert-level" property
and falls back to zero as threshold (like the original NetBSD code).
It also updates the CONFIG register with that very threshold to let the
hardware set a bit and thus alert us when it has been reached.
Since our sensor framework is designed to poll every N seconds and this
driver does not actually look at whether the hardware alerted, neither
using a default threshold of zero nor updating the hardware with it makes
sense.
Remove the alert level code and simply map >50%, >25% and <=25% of
remaining battery life to apm(4)'s "high", "low" and "critical" battery
state respectively; this matches exactly what acpibat(4) does and provides
more meaningful sensor readings without relying on nonexistent device tree
bindings.
Feedback OK patrick
sthen [Thu, 1 Apr 2021 09:56:11 +0000 (09:56 +0000)]
merge NSD 4.3.6rc1
sthen [Thu, 1 Apr 2021 09:55:16 +0000 (09:55 +0000)]
import NSD 4.3.6rc1, tested by me and florian@
mvs [Thu, 1 Apr 2021 08:39:52 +0000 (08:39 +0000)]
Push kernel lock down to umb_rtrequest().
We are going to unlock PF_ROUTE sockets. This means `if_rtrequest'
handler will be performed without kernel lock.
umb_rtrequest() calls umb_send_inet_proposal() which touches kernel lock
protected `ipv{4,6}dns' array. Also umb_rtrequest() is the only handler
which requires kernel lock to be held. So push the lock down to
umb_rtrequest() instead of grab it around `if_rtrequest' call.
This hunk was commited separately for decreases PF_ROUTE sockets
unlocking diff.
ok gerhard@ deraadt@
claudio [Thu, 1 Apr 2021 08:29:10 +0000 (08:29 +0000)]
Make build_crls() behave like build_chain(). If there is not auth data
just NULL the STACK_OF() pointer since libcrypto calls can handle that.
Update comments to be more accurate.
With and OK tb@
claudio [Thu, 1 Apr 2021 06:53:49 +0000 (06:53 +0000)]
Do a better job at cleaning up. Remove empty directories, scan not only the
known repositories but also clean up no longer known repositories.
With this rpki-client keeps its cache nice and shiny.
With and OK job@
claudio [Thu, 1 Apr 2021 06:47:18 +0000 (06:47 +0000)]
Add encoding.c to the various build targets
nicm [Thu, 1 Apr 2021 06:46:12 +0000 (06:46 +0000)]
Change search-again with vi keys to work like actual vi(1), also some
other fixes. From Aaron Jensen with help from Anindya Mukherjee.
claudio [Thu, 1 Apr 2021 06:43:23 +0000 (06:43 +0000)]
Move base64 and hex encoding functions into their own place.
OK tb@
nicm [Thu, 1 Apr 2021 06:37:46 +0000 (06:37 +0000)]
Missing commas, from Vipul Kumar.
djm [Wed, 31 Mar 2021 22:16:34 +0000 (22:16 +0000)]
Use new limits@openssh.com protocol extension to let the client select
good limits based on what the server supports. Split the download and
upload buffer sizes to allow them to be chosen independently.
In practice (and assuming upgraded sftp/sftp-server at each end), this
increases the download buffer 32->64KiB and the upload buffer
32->255KiB.
Patches from Mike Frysinger; ok dtucker@
djm [Wed, 31 Mar 2021 21:59:26 +0000 (21:59 +0000)]
cannot effectively test posix-rename extension after changes in
feature advertisment.
djm [Wed, 31 Mar 2021 21:58:07 +0000 (21:58 +0000)]
do not advertise protocol extensions that have been disallowed by
the command-line options (e.g. -p/-P/-R); ok dtucker@
krw [Wed, 31 Mar 2021 21:17:46 +0000 (21:17 +0000)]
Set 'select_timeout' to 'now' when an OFFER is received for the IP address
requested in the DISCOVER.
i.e. immediately accept the OFFER rather than waiting for select_timeout to
expire before accepting the same OFFER.
A corner case since select-timeout is 0 by default.
krw [Wed, 31 Mar 2021 20:52:09 +0000 (20:52 +0000)]
Add two missing checks for strdup() returning NULL.
jmc [Wed, 31 Mar 2021 20:41:35 +0000 (20:41 +0000)]
one of the examples needs an -N (and explanation);
diff from robert scheck
discussed with and tweaked by sthen
jmc [Wed, 31 Mar 2021 20:36:05 +0000 (20:36 +0000)]
add --no-motd to SYNOPSIS;
job [Wed, 31 Mar 2021 19:45:16 +0000 (19:45 +0000)]
Add option to suppress the Message of the Day
Fine deraadt@
schwarze [Wed, 31 Mar 2021 19:31:35 +0000 (19:31 +0000)]
tweak column widths of a .Bl -column table
and avoid an over-long source line while here;
OK martijn@ jmc@
eric [Wed, 31 Mar 2021 19:09:19 +0000 (19:09 +0000)]
turn log_trace() into a macro to prevent evaluating the format string
parameters when tracing is not enabled.
ok millert@
tb [Wed, 31 Mar 2021 18:03:13 +0000 (18:03 +0000)]
Update for DTLSv1.2 support.
eric [Wed, 31 Mar 2021 17:47:16 +0000 (17:47 +0000)]
allow to specify tls protocols and ciphers on relay actions
ok espie@ sthen@ tb@
eric [Wed, 31 Mar 2021 17:42:24 +0000 (17:42 +0000)]
change the barrier so that fd's are always passed and received with
the first byte of the imsg they belong to.
idea, tweaks and ok claudio@
tb [Wed, 31 Mar 2021 17:13:54 +0000 (17:13 +0000)]
Remove workarounds for SSL_is_dtls()
Reminded by inoguchi jsing
tb [Wed, 31 Mar 2021 17:10:13 +0000 (17:10 +0000)]
Remove workaround for missing d2i_DSAPrivateKey_fp prototype
tb [Wed, 31 Mar 2021 17:04:18 +0000 (17:04 +0000)]
sync
tb [Wed, 31 Mar 2021 17:02:18 +0000 (17:02 +0000)]
Bump minors after symbol addition
tb [Wed, 31 Mar 2021 16:59:32 +0000 (16:59 +0000)]
Expose various DTLSv1.2 specific functions and defines
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:56:46 +0000 (16:56 +0000)]
Document SSL_set_hostflags(3) and SSL_get0_peername(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:55:04 +0000 (16:55 +0000)]
Expose SSL_set_hostflags(3) and SSL_get0_peername(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:53:30 +0000 (16:53 +0000)]
Document SSL_use_certificate_chain_file(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:52:15 +0000 (16:52 +0000)]
Expose SSL_use_certificate_chain_file(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:51:06 +0000 (16:51 +0000)]
Provide missing prototype for d2i_DSAPrivateKey_fp(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:48:43 +0000 (16:48 +0000)]
Document EVP_PKEY_new_CMAC_key(3)
ok bcook inoguchi jsing
tb [Wed, 31 Mar 2021 16:47:00 +0000 (16:47 +0000)]
Provide EVP_PKEY_new_CMAC_key(3)
ok bcook inoguchi jsing
claudio [Wed, 31 Mar 2021 16:11:02 +0000 (16:11 +0000)]
Set the process title for the rpki-client subprocesses so they can be
identified more easily.
OK deraadt@
krw [Wed, 31 Mar 2021 15:32:11 +0000 (15:32 +0000)]
Fix some debug output when running in foreground.
Call tick_msg() at startup so it knows if the link
is up. Don't emit 'link timeout expired' messages
after the link has been up.
visa [Wed, 31 Mar 2021 12:59:50 +0000 (12:59 +0000)]
Make ddb's dependency on libz explicit.
OK deraadt@ mpi@
sthen [Wed, 31 Mar 2021 09:59:32 +0000 (09:59 +0000)]
sync
sthen [Wed, 31 Mar 2021 09:59:21 +0000 (09:59 +0000)]
Remove redundant "HUAWEI Mobile" in usbdevs strings, mention radio
technology where known. ok deraadt
mpi [Wed, 31 Mar 2021 08:53:39 +0000 (08:53 +0000)]
Introduce UAO_USES_SWHASH() and use tabs instead of spaces in #defines.
No functionnal change, reduce the difference with NetBSD.
ok jmatthew@
nicm [Wed, 31 Mar 2021 08:37:48 +0000 (08:37 +0000)]
Do not exit if cannot write to normal log file, GitHub issue 2630.
espie [Wed, 31 Mar 2021 08:00:57 +0000 (08:00 +0000)]
document trusted_snapshot
sthen [Tue, 30 Mar 2021 20:58:19 +0000 (20:58 +0000)]
fix typos in comments
schwarze [Tue, 30 Mar 2021 19:23:50 +0000 (19:23 +0000)]
In HTML output, correctly render .Bd -unfilled in proportionally-spaced
font, rather than with the monospace font appropriate for .Bd -literal.
This fixes a minibug reported by anton@.
Implemented by no longer relying on the typical browser default of
"pre { font-family: monospace }" but instead letting <pre> elements
inherit the font family from their parent, then adding an explicit CSS .Li
class only for those displays where the manual page author requested it
by using the -literal option on the .Bd macro.
kettenis [Tue, 30 Mar 2021 16:49:58 +0000 (16:49 +0000)]
Handle systems, such as the Dell Precision 3640, that access
GenericSerialBus operating regions witout checking whether they're really
available. This needs to work on RAMDISK kernels as well. Since we
don't want to pull in the i2c subsystem on those, provide a separate
and much simpler dummy implementation of the GenericSerialBus access code
when SMALL_KERNEL is defined.
ok tb@
kettenis [Tue, 30 Mar 2021 16:46:36 +0000 (16:46 +0000)]
Register the PCI variant of dwiic(4) with acpi(4).
ok tb@
claudio [Tue, 30 Mar 2021 16:05:56 +0000 (16:05 +0000)]
Make http_new() take care of all the error handling. By closing the
outfd and sending back the failure report via http_fail(). This was
partially done in the failure case of http_resolv() and resulted in
double failure reports in that case.
With and OK tb@, previous version OK deraadt@
patrick [Tue, 30 Mar 2021 15:59:04 +0000 (15:59 +0000)]
Some cards announce support for the NTB16 format, but that support does not
work. Hence, add support for NTB32 in the transmit path. We already have
support for NTB32 in the receive path. We detect the supported format on
boot and can then decide on transmit which format to use.
From ehrhardt@ with gerhard@
Tested by jan@
ok sthen@
patrick [Tue, 30 Mar 2021 15:48:36 +0000 (15:48 +0000)]
Some umb(4) devices require the NDP pointer behind the NDP datagram.
From gerhard@
"broadly OK" sthen@
sashan [Tue, 30 Mar 2021 08:37:10 +0000 (08:37 +0000)]
[ICMP] IP options lead to malformed reply
icmp_send() must update IP header length if IP optaions are appended.
Such packet also has to be dispatched with IP_RAWOUTPUT flags.
Bug reported and fix co-designed by Dominik Schreilechner _at_ siemens _dot_ com
OK bluhm@
kevlo [Tue, 30 Mar 2021 00:55:08 +0000 (00:55 +0000)]
Move tx/rx descriptors into their own structs.
This is a first step toward making rge work with multiple queues and interrupts.
Only one queue is currently used.
While here, update the RTL8125B microcode.
ok jmatthew@
dv [Mon, 29 Mar 2021 23:37:01 +0000 (23:37 +0000)]
Propagate host-side tap(4) lladdr to guest vm process to allow unicast dhcp
and bootp renewals with vmd(8)'s built-in dhcp server. Previous behavior
ignored did not intercept these packets and instead transmitted them.
This should make vmd(8)'s dhcp behave more as a true dhcp server should and
allows it to work properly with the new dhcpleased(8) attempting a renewal.
OK mlarkin@
kn [Mon, 29 Mar 2021 20:10:30 +0000 (20:10 +0000)]
Install apm(8) and and apmd(8) under MI MANPATH
powerpc64 was lacking manual pages; instead of shipping yet another
identical MD manual, merge them under MI MANPATH as usual.
Input OK deraadt
tb [Mon, 29 Mar 2021 18:24:04 +0000 (18:24 +0000)]
whitespace nits
tb [Mon, 29 Mar 2021 17:58:29 +0000 (17:58 +0000)]
Prepare documenting EVP_PKEY_new_CMAC_key(3)
Based on some text in OpenSSL 1.1.1's EVP_PKEY_new.pod.
kettenis [Mon, 29 Mar 2021 17:04:00 +0000 (17:04 +0000)]
Turns out the PCIe DARTs support a full 32-bit device virtual address space.
Adjust the region managed by the extend accordingly but avoid the first
and last page. The last page collides with the MSI address used by the
PCIe controller and not using the first page helps finding bugs.
ok patrick@
jsing [Mon, 29 Mar 2021 16:57:38 +0000 (16:57 +0000)]
Remove pointless assignment in SSL_get0_alpn_selected().
ok tb@
jsing [Mon, 29 Mar 2021 16:56:20 +0000 (16:56 +0000)]
Avoid transcript initialisation when sending a TLS HelloRequest.
When server side renegotiation is triggered, the TLSv1.2 state machine
sends a HelloRequest before going to ST_SW_FLUSH and ST_OK. In this case
we do not need the transcript and currently hit the sanity check in ST_OK
that ensures the transcript has been freed, breaking server initiated
renegotiation. We do however need the transcript in the DTLS case.
ok tb@
jsing [Mon, 29 Mar 2021 16:46:09 +0000 (16:46 +0000)]
Move finished and peer finished to the handshake struct.
This moves the finish_md and peer_finish_md from the 'tmp' struct to the
handshake struct, renaming to finished and peer_finished in the process.
This also allows the remaining S3I(s) references to be removed from the
TLSv1.3 client and server.
ok inoguchi@ tb@
jsing [Mon, 29 Mar 2021 16:22:02 +0000 (16:22 +0000)]
Add regress coverage for TLSv1.2 record number increment.
jsing [Mon, 29 Mar 2021 16:19:15 +0000 (16:19 +0000)]
Move the TLSv1.2 record number increment into the new record layer.
This adds checks (based on the TLSv1.3 implementation) to ensure that the
TLS/DTLS sequence numbers do not wrap, as required by the respective RFCs.
ok inoguchi@ tb@
tb [Mon, 29 Mar 2021 15:57:23 +0000 (15:57 +0000)]
Prepare to provide EVP_PKEY_new_CMAC_key()
sebastia ran into this when attempting to update security/hcxtools.
This will be tested via wycheproof.go once the symbol is public.
ok jsing, tested by sebastia
claudio [Mon, 29 Mar 2021 15:47:34 +0000 (15:47 +0000)]
Add a pretty_key_id() which reinserts colons into the hex string.
This way the AKI and SKI printed in the tests tools look the same as before.
Requested by job@, OK job@ tb@
claudio [Mon, 29 Mar 2021 15:37:04 +0000 (15:37 +0000)]
Fix my email address in copyright line