openbsd
3 years agocombine umb_products and umb_fccauth_devs into one umb_quirks table
sthen [Mon, 29 Mar 2021 13:38:01 +0000 (13:38 +0000)]
combine umb_products and umb_fccauth_devs into one umb_quirks table
ok gerhard@

3 years agoCleanly teardown and restore emulated device state on vm send/receive.
dv [Mon, 29 Mar 2021 13:09:41 +0000 (13:09 +0000)]
Cleanly teardown and restore emulated device state on vm send/receive.

This cleans up events on a pause or resume, but also fixes an issue
where the vm_pipe event channels are not properly reinitialized on a
received guest leading to broken serial console.

OK pd@, mlarkin@

3 years agoIntroduce hex_encode() to transform the aki/ski values to a string.
claudio [Mon, 29 Mar 2021 12:41:34 +0000 (12:41 +0000)]
Introduce hex_encode() to transform the aki/ski values to a string.
OK tb@

3 years agoFix IA32_EPT_VPID_CAP_XO_TRANSLATIONS specification
dv [Mon, 29 Mar 2021 12:39:02 +0000 (12:39 +0000)]
Fix IA32_EPT_VPID_CAP_XO_TRANSLATIONS specification

Per Intel SDM (Vol 3D, App. A.10) bit 0 should be read as a 1 if enabled.

From Adam Steen. ok mlarkin@

3 years agoInline x509_get_extensions() and remove it
tb [Mon, 29 Mar 2021 06:50:44 +0000 (06:50 +0000)]
Inline x509_get_extensions() and remove it

Since aia, aki and ski are all represented by char *, this is an
error-prone interface - as found by job. The function doesn't do
much anyway.

ok claudio

3 years agoPull up freeing cms in gbr_parse() after its last use to avoid a leak
tb [Mon, 29 Mar 2021 06:38:35 +0000 (06:38 +0000)]
Pull up freeing cms in gbr_parse() after its last use to avoid a leak
on x509_get_extensions() failure.

Fix suggested by claudio

3 years agoCheck all inet_ntop() calls, in case we screw up the parameters somehow we
deraadt [Mon, 29 Mar 2021 06:15:29 +0000 (06:15 +0000)]
Check all inet_ntop() calls, in case we screw up the parameters somehow we
prefer a failure rather than some sort of weird truncation
ok claudio

3 years agosort includes
tb [Mon, 29 Mar 2021 04:01:17 +0000 (04:01 +0000)]
sort includes

3 years agoRemove accidental but justified annotation
tb [Mon, 29 Mar 2021 04:00:38 +0000 (04:00 +0000)]
Remove accidental but justified annotation

3 years agospellings
yasuoka [Mon, 29 Mar 2021 03:54:39 +0000 (03:54 +0000)]
spellings
suggested by jsg

3 years agominor KNF and consistancy
deraadt [Mon, 29 Mar 2021 03:45:35 +0000 (03:45 +0000)]
minor KNF and consistancy
(rpki-client is pretty good code, couple hours of audit and I can only find
a few minor things)

3 years agoimprove the naming of some intermediate buffers
deraadt [Mon, 29 Mar 2021 03:39:14 +0000 (03:39 +0000)]
improve the naming of some intermediate buffers

3 years ago3 additional snprintf() range checks (inconceivable these would ever
deraadt [Mon, 29 Mar 2021 03:35:32 +0000 (03:35 +0000)]
3 additional snprintf() range checks (inconceivable these would ever
truncate, but if they do, we prefer to know)
ok job claudio

3 years agoin unsafe_char(), handle %NN with array-index inspection rather than weird
deraadt [Mon, 29 Mar 2021 03:34:52 +0000 (03:34 +0000)]
in unsafe_char(), handle %NN with array-index inspection rather than weird
ptr++
ok claudio

3 years agoThe failure mode of test-tls13-version-negotiation.py has changed.
tb [Sun, 28 Mar 2021 18:12:09 +0000 (18:12 +0000)]
The failure mode of test-tls13-version-negotiation.py has changed.
Update comment.

3 years agoSince ipw(4) doesn't call into net80211_newstate() the interface link state
stsp [Sun, 28 Mar 2021 18:02:32 +0000 (18:02 +0000)]
Since ipw(4) doesn't call into net80211_newstate() the interface link state
must be updated by the driver in order to get packets to flow.

In case of WPA the link state was updated as a side-effect of a successful
WPA handshake. This commit fixes the WEP and plaintext cases.

Problem reported and fix tested by Riccardo Mottola.

3 years agoNow that the real time and monotonic time streams don't
krw [Sun, 28 Mar 2021 17:25:21 +0000 (17:25 +0000)]
Now that the real time and monotonic time streams don't
cross flip CLOCK_REALTIME to CLOCK_MONOTONIC.

Suggested by cheloha@, millert@, otto@ at various
stages in the time_t -> timespec conversion.

3 years agoConvert remaining timers (lease renew, rebind, expiry) to
krw [Sun, 28 Mar 2021 16:23:05 +0000 (16:23 +0000)]
Convert remaining timers (lease renew, rebind, expiry) to
timespec values. Translate from the epoch values in leases
to timespec values in one place.

Final step to allow CLOCK_REALTIME -> CLOCK_MONOTONIC time
accounting for the active lease.

3 years agoAdd some restrictions to manifest object profile
job [Sun, 28 Mar 2021 16:22:17 +0000 (16:22 +0000)]
Add some restrictions to manifest object profile

OK tb@, feedback from claudio@

3 years agoFix duplicate SSL_is_dtls in libssl and apps.c
inoguchi [Sun, 28 Mar 2021 12:38:52 +0000 (12:38 +0000)]
Fix duplicate SSL_is_dtls in libssl and apps.c

Currently, SSL_is_dtls exists in both libssl and apps.c,
and one in libssl is guarded by LIBRESSL_INTERNAL and not exposed yet.
This causes portable build broke with openssl(1) and optionstest.
To solve this temporarily, rename SSL_is_dtls by apps.h.
This temporary renaming will be removed when the SSL_is_dtls() is exposed.

ok jsing@

3 years agolist Dell DW5821e as supported for umb(4)
sthen [Sun, 28 Mar 2021 12:10:05 +0000 (12:10 +0000)]
list Dell DW5821e as supported for umb(4)

3 years agoAdd vid/pid table to umb(4) allowing matching to alternate config
sthen [Sun, 28 Mar 2021 12:08:58 +0000 (12:08 +0000)]
Add vid/pid table to umb(4) allowing matching to alternate config

Some devices present multiple configurations and the one chosen by default
is not always usable - for example, some have an CDC ECM config that does
not work with our cdce(4) - allow overriding to a specific config in those
cases.

From gerhard@ with tweaks to comments by me, ok patrick@

3 years agosync
sthen [Sun, 28 Mar 2021 12:06:46 +0000 (12:06 +0000)]
sync

3 years agoadd pid for Dell DW5821e and HUAWEI ME906s LTE, ok patrick@
sthen [Sun, 28 Mar 2021 12:06:35 +0000 (12:06 +0000)]
add pid for Dell DW5821e and HUAWEI ME906s LTE, ok patrick@

3 years agoMake sure that all CPUs end up with the same bits set in SCTLR_EL1.
kettenis [Sat, 27 Mar 2021 20:03:15 +0000 (20:03 +0000)]
Make sure that all CPUs end up with the same bits set in SCTLR_EL1.
Do this by clearing all the bits marked RES0 and set all the bits
marked RES1 for the ARMv8.0.

Any optional features introduced in later revisions of the architecture
(such as PAN) will be enabled after SCTLR_EL1 is initialized.

ok patrick@

3 years agoAdd ARMv8.5 instruction set related CPU features.
kettenis [Sat, 27 Mar 2021 19:57:19 +0000 (19:57 +0000)]
Add ARMv8.5 instruction set related CPU features.

ok patrick@

3 years agoSend arguments in alphabetical order
job [Sat, 27 Mar 2021 18:12:15 +0000 (18:12 +0000)]
Send arguments in alphabetical order

OK tb@

3 years agoEnable test-sig-algs-renegotiation-resumption.py.
tb [Sat, 27 Mar 2021 18:11:53 +0000 (18:11 +0000)]
Enable test-sig-algs-renegotiation-resumption.py.

This test covers various scenarios with renegotiation and session
resumption. In particular it crashes the OpenSSL 1.1.1j server due
to the sigalg NULL deref fixed this week. We need --sig-algs-drop-ok
since we do not currently implement signature_algorithms_cert.

3 years agoIf we want to configure default routes over multiple interfaces we
florian [Sat, 27 Mar 2021 18:10:38 +0000 (18:10 +0000)]
If we want to configure default routes over multiple interfaces we
need to provide the address of the interface behind which the default
router is in case they are on the same subnet otherwise the kernel
can't figure out which route we are talking about
This happens for example when your wifi and wired networks are bridged.
Pointed out by claudio some time ago.

3 years agoGarbage collect s->internal->type
tb [Sat, 27 Mar 2021 17:56:28 +0000 (17:56 +0000)]
Garbage collect s->internal->type

This variable is used in the legacy stack to decide whether we are
a server or a client. That's what s->server is for...

The new TLSv1.3 stack failed to set s->internal->type, which resulted
in hilarious mishandling of previous_{client,server}_finished. Indeed,
both client and server would first store the client's verify_data in
previous_server_finished and later overwrite it with the server's
verify_data. Consequently, renegotiation has been completely broken
for more than a year. In fact, server side renegotiation was broken
during the 6.5 release cycle. Clearly, no-one uses this.

This commit fixes client side renegotiation and restores the previous
behavior of SSL_get_client_CA_list(). Server side renegotiation will
be fixed in a later commit.

ok jsing

3 years agoFix SDMMC_DEBUG build
kn [Sat, 27 Mar 2021 14:36:28 +0000 (14:36 +0000)]
Fix SDMMC_DEBUG build

- Replace undefined SDMMCDEVNAME macro with usual DEVNAME from sdmmcvar.h
- typofix struct member name

3 years agoHandle dynamic definition of SIGSTKSZ as of glibc 2.34 on Linux.
bcook [Sat, 27 Mar 2021 11:17:58 +0000 (11:17 +0000)]
Handle dynamic definition of SIGSTKSZ as of glibc 2.34 on Linux.

ok bluhm@, inoguchi@, tb@, deraadt@

3 years agoThe ospf6d manpage states that the daemon laks support for multi area
remi [Sat, 27 Mar 2021 10:23:25 +0000 (10:23 +0000)]
The ospf6d manpage states that the daemon laks support for multi area
configurations. Fix the example config to only use one area instead of
two.

Issue brought up and OK danj@
claudio@ doesn't mind

3 years agotrim the FCS off Ethernet packets before sending them up the stack.
dlg [Sat, 27 Mar 2021 01:12:01 +0000 (01:12 +0000)]
trim the FCS off Ethernet packets before sending them up the stack.

Jurjen Oskam on tech@ found that ure in a veb caused these extra
fcs bytes to be transmitted by other veb members. the extra bytes
aren't a problem usually because our network stack ignores them if
they're present, eg, the ip stack reads an ip packet length and
trims bytes in an mbuf if there's more. bridge(4) masked this problem
because it always parses IP packets going over the bridge and trims
them like the IP stack before pushing them out another port.

veb(4) generally just moves packets around based on the Ethernet
header, by default it doesn't look too deeply into packets, which
is why this issue popped out.

it is more correct for ure to just not pass the fcs bytes up.

ok jmatthew@ kevlo@

3 years agoReturn EOPNOTSUPP for unsupported ioctls
kn [Fri, 26 Mar 2021 23:34:50 +0000 (23:34 +0000)]
Return EOPNOTSUPP for unsupported ioctls

Match what apm(4/macppc) says and make apmd(8) log an approiate warning when
unsupported power actions are requested.

Merge identical cases while here.

This syncs with the apm ioctl handlers on loongson and arm64.

3 years agoFix "mach dtb" return code to avoid bogus boot
kn [Fri, 26 Mar 2021 23:29:21 +0000 (23:29 +0000)]
Fix "mach dtb" return code to avoid bogus boot

Bootloader command functions must return zero in case of failure,
returning 1 tells the bootloader to boot the currently set kernel iamge.

"machine dtb" is is the wrong way around so using it triggers a boot.

Fix this and print a brief usage (like other commands such as "hexdump" do)
while here.

Feedback OK patrick

3 years agoFix errno, merge ioctl cases
kn [Fri, 26 Mar 2021 22:55:48 +0000 (22:55 +0000)]
Fix errno, merge ioctl cases

The EBADF error is always overwritten for the standby, suspend and
hibernate ioctls, only the mode ioctl has it right.

Merge the now identical casese while here.

OK patrick

3 years agoFlag sensors as invalid on bogus reads
kn [Fri, 26 Mar 2021 22:54:41 +0000 (22:54 +0000)]
Flag sensors as invalid on bogus reads

Follow-up to the previous commit:

This driver continues to report stale hw.sensors values when reading
them fails, which can easily be observed on a Pinebook Pro after
plugging in the AC cable, causing the hw.sensors.cwfg0.raw0 (battery
remaining minutes) value to jump considerably one or two times before
stalling and becoming incoherent with the rest.

Flag sensors invalid upfront in apm's fashion and mark them OK iff they
yield valid values;   this is what other drivers such as rktemp(4) do,
but the consequence/intention of SENSOR_FINVALID is sysctl(8) and systat(8)
skipping such sensors (until AC gets plugged off again).

OK patrick

3 years agoPush kernel lock within rtable_add(9) and rework it to return 0 in the
mvs [Fri, 26 Mar 2021 22:41:06 +0000 (22:41 +0000)]
Push kernel lock within rtable_add(9) and rework it to return 0 in the
case when requested table is already exists.

Except initialization time, route_output() and if_createrdomain() are the
only paths where we call rtable_add(9). We check requested table existence
by rtable_exists(9) and it's not the error condition if the table exists.
Otherwise we are trying to create requested table by rtable_add(9). Those
paths are kernel locked so concurrent thread can't create requested table
just after rtable_exists(9) check. Also rtable_add(9) has internal
rtable_exists(9) check and in this case the table existence assumed as
EEXIST error. This error path is never reached.

We are going to unlock PF_ROUTE sockets. This means route_output() will
not be serialized with if_createrdomain() and concurrent thread could
create requested table. Table existence check and creation should be
serialized and it makes sense to do this within rtable_add(9). This time
kernel lock is used for this so it pushed down to rtable_add(9). The
internal rtable_exists(9) check was modified and table existence is not
error now.

Since the external rtable_exists(9) check is useless it was removed from
if_createrdomain(). It still exists in route_output() path because the
logic is more complicated here.

ok mpi@

3 years agoPush kernel lock down to rt_setsource() to make `ifa' dereference safe.
mvs [Fri, 26 Mar 2021 22:40:08 +0000 (22:40 +0000)]
Push kernel lock down to rt_setsource() to make `ifa' dereference safe.
Netlock doesn't make sense here because ifa_ifwithaddr() holds kernel
lock while performs lists walkthrough.

This was made to decrease the future diff for PF_ROUTE sockets
unlocking. This time kernel lock is still held while we perform
rt_setsource().

ok mpi@

3 years agoAdd test-sig-algs-renegotiation-resumption.py
tb [Fri, 26 Mar 2021 22:35:17 +0000 (22:35 +0000)]
Add test-sig-algs-renegotiation-resumption.py

This test currently fails but may soon be fixed.

3 years agoInitialize error variable in dtread().
bluhm [Fri, 26 Mar 2021 21:17:10 +0000 (21:17 +0000)]
Initialize error variable in dtread().
OK mpi@

3 years agoOnly install route with label, fix route leak on destroy
kn [Fri, 26 Mar 2021 19:00:21 +0000 (19:00 +0000)]
Only install route with label, fix route leak on destroy

ifconfig mp* mplslabel N" validates the label both in ifconfig(8) and each
driver's ioctl handler, but there is one case where all drivers install
a route without looking at the label at all.

SIOCSLIFPHYRTABLE in all three drivers just validates the rdomain and sets
the label to itself (0) such that the route is (re)installed accordingly.

None of the driver's helper functions dealing with labels and routes
validate labels themselves but instead expect the callees, e.g. the ioctl
handler to do so.

That means we can install routes for the explicit NULL label in non-default
routing tables but are never able to clean them up without reboot.

Fix this by adding the inverse of mp*_clone_destroy()'s label check to the
routines installing the MPLS route to avoid bogus ones in the first place.

OK claudio

3 years agoinspect all the packets to see if they are dhcp, not just the first one
deraadt [Fri, 26 Mar 2021 17:40:03 +0000 (17:40 +0000)]
inspect all the packets to see if they are dhcp, not just the first one
in a ring bundle.
ok florian

3 years agoSimplify argument parsing of vmctl stop
tb [Fri, 26 Mar 2021 16:28:15 +0000 (16:28 +0000)]
Simplify argument parsing of vmctl stop

The previous argument parsing logic had at least three bugs:
a copy-paste error led to an off-by-one and a printf "%s" NULL,
as reported by Preben Guldberg.  A previous commit led to a dead
else branch and a use of uninitialized.  This can all be avoided
by reworking the logic so as to be readable.

Prompted by a diff from Preben

ok dv

3 years agoCompare filepath with strcmp() and not strcasecmp(). The URI in RPKI are
claudio [Fri, 26 Mar 2021 16:03:29 +0000 (16:03 +0000)]
Compare filepath with strcmp() and not strcasecmp(). The URI in RPKI are
case sensitive.
OK tb@

3 years agoInvert the 'R' indicator which seems rather unintuitive at the moment,
lum [Fri, 26 Mar 2021 15:02:10 +0000 (15:02 +0000)]
Invert the 'R' indicator which seems rather unintuitive at the moment,
currently a '*' next to a file's name indicates it is writable. With
this diff it now means it is read-only. Also make the active buffer
indicator more visible:'.'->'>'.

3 years agoSort header files and wrap long lines in x509.c
inoguchi [Fri, 26 Mar 2021 13:46:25 +0000 (13:46 +0000)]
Sort header files and wrap long lines in x509.c

3 years agoRemove parenthesis around return value to reduce the diff with NetBSD.
mpi [Fri, 26 Mar 2021 13:40:05 +0000 (13:40 +0000)]
Remove parenthesis around return value to reduce the diff with NetBSD.

No functional change.

ok mlarkin@

3 years agoAdd 'get-environment-variable', in a fashion:
lum [Fri, 26 Mar 2021 12:31:37 +0000 (12:31 +0000)]
Add 'get-environment-variable', in a fashion:

(define curdir(get-environment-variable CURDIR))
(insert curdir)

Should now print the value of the environment variable CURDIR's value,
or error if it is not set.

3 years agoFix wrong sequence number wrap in ieee80211_recv_auth().
stsp [Fri, 26 Mar 2021 10:18:55 +0000 (10:18 +0000)]
Fix wrong sequence number wrap in ieee80211_recv_auth().
IEEE 802.11 sequence numbers wrap around at 0xfff, not 0xffff.
ok phessler@ kevlo@

3 years agoRewrite poll loop a bit. Put the various message queues into an array
claudio [Fri, 26 Mar 2021 10:01:51 +0000 (10:01 +0000)]
Rewrite poll loop a bit. Put the various message queues into an array
with the same order as the pollfds. This way simple for loops can be
used to setup and handle all cases but POLLIN.
OK tb@

3 years agoChange the regex for define names. Make more characters available.
lum [Fri, 26 Mar 2021 08:27:49 +0000 (08:27 +0000)]
Change the regex for define names. Make more characters available.
Keep the same regex for mg function names. Though perhaps for
user-defined functions other characters could be ok....

3 years agoregen
jan [Fri, 26 Mar 2021 08:17:23 +0000 (08:17 +0000)]
regen

3 years agoAdd PCI ID for Intel X710 10G SFP+ NIC
jan [Fri, 26 Mar 2021 08:02:34 +0000 (08:02 +0000)]
Add PCI ID for Intel X710 10G SFP+ NIC

ok patrick@

3 years agoregen
jan [Fri, 26 Mar 2021 08:00:02 +0000 (08:00 +0000)]
regen

3 years agoAdd missing PCI ID for Intel X710 SFP+ NIC
jan [Fri, 26 Mar 2021 07:58:44 +0000 (07:58 +0000)]
Add missing PCI ID for Intel X710 SFP+ NIC

ok patrick@

3 years agoChange two more bool counters to pointer NULL checks.
lum [Fri, 26 Mar 2021 07:25:23 +0000 (07:25 +0000)]
Change two more bool counters to pointer NULL checks.

3 years agoResync the supported hardware list with armv7.html, suggested by,
dtucker [Fri, 26 Mar 2021 02:28:43 +0000 (02:28 +0000)]
Resync the supported hardware list with armv7.html, suggested by,
corrections and ok jsg@.  This replaces the obsolete list of boards and
their supported devices with the current list of supported boards only,
similar to arm64.

3 years agoPermit kern.somaxconn when the unix pledge is used. Previously this was only
abieber [Thu, 25 Mar 2021 21:27:45 +0000 (21:27 +0000)]
Permit kern.somaxconn when the unix pledge is used. Previously this was only
allowed when inet was used.

This lets Go programs use 'unix' without also including 'inet'.

from Josh Rickmar

ok / tree review from deraadt@, commit message cluestick from tb@

3 years agoLog ioctl failures
kn [Thu, 25 Mar 2021 20:46:55 +0000 (20:46 +0000)]
Log ioctl failures

Otherwise there is no way to determine why e.g. zzz(8) does not do anything
on certain machines;  macppc and arm64 for example have no suspend/resume
suspend at all (for now) and loongson has partial support.

This still does not make `zzz' or `apm -z' report the informative
warning on standar error, but syslog now prints

apmd: system suspending
apmd: battery status: unknown. external power status: not known. estimated battery life 0%
apmd: suspend: Operation not supported

OK benno

3 years agoMove the expression list create item code into a single function.
lum [Thu, 25 Mar 2021 20:25:31 +0000 (20:25 +0000)]
Move the expression list create item code into a single function.

3 years agomail(1) cares about whitespace
deraadt [Thu, 25 Mar 2021 19:10:39 +0000 (19:10 +0000)]
mail(1) cares about whitespace

3 years agoAdd an (exit) method.
lum [Thu, 25 Mar 2021 17:31:21 +0000 (17:31 +0000)]
Add an (exit) method.

3 years agoUser a pointer's value (!NULL) instead of a boolean to indicate some
lum [Thu, 25 Mar 2021 16:58:46 +0000 (16:58 +0000)]
User a pointer's value (!NULL) instead of a boolean to indicate some
kind of data being found.

3 years agoan invalid value of `mcs' may come from the hardware so adjust code so that the
mestre [Thu, 25 Mar 2021 16:23:39 +0000 (16:23 +0000)]
an invalid value of `mcs' may come from the hardware so adjust code so that the
value is only used after checking if it's valid or not.

CID 1502921

OK stsp@ phessler@

3 years agoUse length of line to indicate end of characters to process in
lum [Thu, 25 Mar 2021 12:46:11 +0000 (12:46 +0000)]
Use length of line to indicate end of characters to process in
foundparen(). No intended functional change. regress tests ok and they
all use excline().

3 years agoAdjust HTTP client code a bit. Add support for 304 Not Modified responses,
claudio [Thu, 25 Mar 2021 12:18:45 +0000 (12:18 +0000)]
Adjust HTTP client code a bit. Add support for 304 Not Modified responses,
remove handling of 206 Partial Content (the client does not use range
headers). Report the Last-Modified timestamp back to the requestor and
switch OK to a enum value for (FAIL, OK and NOT MODIFIED).
OK tb@

3 years agoProvide apm(4/arm64) with battery information
kn [Thu, 25 Mar 2021 12:18:27 +0000 (12:18 +0000)]
Provide apm(4/arm64) with battery information

apm merely provides an all zero/unknown stub for those values, e.g. apm(8)
output is useless.

Hardware sensors however provide this information:

hw.sensors.cwfg0.volt0=3.76 VDC (battery voltage)
hw.sensors.cwfg0.raw0=259 (battery remaining minutes)
hw.sensors.cwfg0.percent0=58.00% (battery percent)

Make cwfg(4) copy those over using apm_setinfohook() for apm to show it:

Battery state: high, 58% remaining, 259 minutes life estimate
A/C adapter state: not known
Performance adjustment mode: auto (408 MHz)

In cwfg's update routine, to keep values coherent, always reset them to
zero/unknown and only set those that came from a valid reading.

Input OK jca

3 years agoAdjust base64_decode() to just take a base64 string as input instead of
claudio [Thu, 25 Mar 2021 09:27:38 +0000 (09:27 +0000)]
Adjust base64_decode() to just take a base64 string as input instead of
a string plus length. Preparation work for RRDP.
OK tb@

3 years agoAvoid mangled output in BIO_debug_callback
tb [Thu, 25 Mar 2021 09:26:17 +0000 (09:26 +0000)]
Avoid mangled output in BIO_debug_callback

Instead of blindly skipping 14 characters, we can use the return
value of snprintf() to determine how much we should skip.

From Martin Vahlensieck with minor tweaks by me

3 years agoremove uneeded includes in md armv7 files
jsg [Thu, 25 Mar 2021 04:12:00 +0000 (04:12 +0000)]
remove uneeded includes in md armv7 files

based on include-what-you-use suggestions

3 years agoSync correct ROUNDUP() from net/route.c
tobhe [Thu, 25 Mar 2021 01:39:09 +0000 (01:39 +0000)]
Sync correct ROUNDUP() from net/route.c

3 years agoThe server only sends a cookie during a HRR, not a SH
tb [Wed, 24 Mar 2021 21:36:26 +0000 (21:36 +0000)]
The server only sends a cookie during a HRR, not a SH

3 years agotest HEAD requests, from niklas@
benno [Wed, 24 Mar 2021 21:03:06 +0000 (21:03 +0000)]
test HEAD requests, from niklas@

3 years agoResponses to HEAD requests must not have a message body (even though they have
benno [Wed, 24 Mar 2021 20:59:53 +0000 (20:59 +0000)]
Responses to HEAD requests must not have a message body (even though they have
a Content-Length header).  HTTP RFC 7231 section 4.3.2.
found by niklas@, claudio@ agrees.

3 years agoUpdate regress for new_cipher rename.
jsing [Wed, 24 Mar 2021 19:02:35 +0000 (19:02 +0000)]
Update regress for new_cipher rename.

3 years agoAdd mouse.tp.tapping example.
bru [Wed, 24 Mar 2021 18:50:54 +0000 (18:50 +0000)]
Add mouse.tp.tapping example.

ok kn@

3 years agosync
sthen [Wed, 24 Mar 2021 18:49:40 +0000 (18:49 +0000)]
sync

3 years agoremove vendor name (Dell) repeated in product name
sthen [Wed, 24 Mar 2021 18:49:25 +0000 (18:49 +0000)]
remove vendor name (Dell) repeated in product name

3 years agoRename new_cipher to cipher.
jsing [Wed, 24 Mar 2021 18:43:59 +0000 (18:43 +0000)]
Rename new_cipher to cipher.

This is in the SSL_HANDSHAKE struct and is what we're currently
negotiating, so there is really nothing more "new" about the cipher
than there is the key block or other parts of the handshake data.

ok inoguchi@ tb@

3 years agoAdd SSL_HANDSHAKE_TLS12 for TLSv1.2 specific handshake data.
jsing [Wed, 24 Mar 2021 18:40:03 +0000 (18:40 +0000)]
Add SSL_HANDSHAKE_TLS12 for TLSv1.2 specific handshake data.

Move TLSv1.2 specific components over from SSL_HANDSHAKE.

ok inoguchi@ tb@

3 years agoImprove the tap detection mechanism.
bru [Wed, 24 Mar 2021 18:28:24 +0000 (18:28 +0000)]
Improve the tap detection mechanism.

Revision 1.29 of wstpad.c has removed the 'maxdist' checks
for multi-finger taps.  While this change makes tap detection
more reliable, and does not affect inputs intended for pointer
movement, it might interfere with short scroll gestures.
This version reorganizes the filtering code, and reintroduces
a weaker version of those checks for MT touchpads.

3 years agocd9660, mfs: do not hide generic vop functions behind #define
semarie [Wed, 24 Mar 2021 16:17:05 +0000 (16:17 +0000)]
cd9660, mfs: do not hide generic vop functions behind #define

It makes clearer which vop functions are real fileystem-implementations and which one are only stubs.

No functional changes are intented.

ok visa@

3 years agomake some `struct vops' members explicitly NULL instead of implicitly NULL
semarie [Wed, 24 Mar 2021 16:11:32 +0000 (16:11 +0000)]
make some `struct vops' members explicitly NULL instead of implicitly NULL

ok mpi@

3 years agoMore timespec conversions. Less 'seconds' arithmetic.
krw [Wed, 24 Mar 2021 16:04:10 +0000 (16:04 +0000)]
More timespec conversions. Less 'seconds' arithmetic.

3 years agoThe logic in mmrw() to check whether an address is within direct
bluhm [Wed, 24 Mar 2021 14:26:39 +0000 (14:26 +0000)]
The logic in mmrw() to check whether an address is within direct
map was the wrong way around.  The && prevented an EFAULT error and
could pass userland addresses as kernel source to copyout(9).  The
kernel could crash with protection fault due to an invalid offset
when reading /dev/kmem.
Also make the range checks stricter.  Not only the start address
must be valid, but also the end address must be within the region
to be copied.
Note that sysctl kern.allowkmem=0 makes the bug unreachable by
default.
OK deraadt@

3 years agoConvert openssl(1) x509 option handling
inoguchi [Wed, 24 Mar 2021 12:09:16 +0000 (12:09 +0000)]
Convert openssl(1) x509 option handling

Apply new option handling to openssl(1) x509.
To handle incremental order value, using newly added OPTION_ORDER.

I left the descriptions for -CAform, -inform, and -outform as it was,
for now. These description would be fixed.
And digest option handler could be consolidated to one between
some subcommands in the future.

ok and comments from tb@,
and "I'd move forward with your current plan." from jsing@

3 years agoAdd option type OPTION_ORDER
inoguchi [Wed, 24 Mar 2021 12:07:39 +0000 (12:07 +0000)]
Add option type OPTION_ORDER

To handle incremental order value, added new option type OPTION_ORDER.
openssl(1) x509 requires this option handling, since,
- -CA and -signkey require to set both filename and incremental 'num'.
- -dates requires to set two variables in a row, startdate and enddate.
and this couldn't be solved by OPTION_FLAG_ORD.

ok tb@ and "I'd move forward with your current plan." from jsing@

3 years agoMake tap detection less restrictive for multi-finger taps.
bru [Wed, 24 Mar 2021 07:40:37 +0000 (07:40 +0000)]
Make tap detection less restrictive for multi-finger taps.

In order to distinguish tap gestures from short movements, the mechanism
checks whether the distance between the first and the last position of a
touch exceeds the 'maxdist' limit.  Some touchpads provide unreliable
coordinates when more than one contact is being made simultaneously, and
in this case the filter may be too strong - and superfluous, because only
one-finger contacts should trigger pointer movement.

3 years agoDefine a USB quirk for devices that need to keep their pipes open at
jcs [Wed, 24 Mar 2021 02:49:57 +0000 (02:49 +0000)]
Define a USB quirk for devices that need to keep their pipes open at
all times, before the device is enabled and after the device is
disabled by wscons.

This was originally needed by umt for the Microsoft Surface Type
Cover to avoid it resetting (or at least detaching and reattaching)
when the touchpad was touched while at the console.

A similar problem occurs with the Pinebook Pro's keyboard when
switching from X to the console due to the touchpad getting
disabled, so add it to ums as well.

with and ok kurt

3 years agoregen
jcs [Wed, 24 Mar 2021 02:21:40 +0000 (02:21 +0000)]
regen

3 years agoadd HAILUCK Keyboard
jcs [Wed, 24 Mar 2021 02:20:44 +0000 (02:20 +0000)]
add HAILUCK Keyboard

from kurt

3 years agoensure the long-name version of ld is in the base set (rather than the
deraadt [Wed, 24 Mar 2021 00:27:34 +0000 (00:27 +0000)]
ensure the long-name version of ld is in the base set (rather than the
comp set), as it is supposed to be hard-linked.
found by Yoshihiro Kawamata

3 years agoFix some ranges and type handling.
martijn [Tue, 23 Mar 2021 22:07:36 +0000 (22:07 +0000)]
Fix some ranges and type handling.

OK sthen@

3 years agoAdd DisplayString/SnmpAdminString in accordance with recent OPENBSD-PF-MIB
martijn [Tue, 23 Mar 2021 22:05:21 +0000 (22:05 +0000)]
Add DisplayString/SnmpAdminString in accordance with recent OPENBSD-PF-MIB
changes.

OK sthen@

3 years agoDon't send DELETE notify if IKE SA is replaced because of
tobhe [Tue, 23 Mar 2021 21:31:29 +0000 (21:31 +0000)]
Don't send DELETE notify if IKE SA is replaced because of
'enforcesingleikesa'.  Fixes an interop problem with strongswan
if make-before-break is enabled.

ok patrick@

3 years agoOCSP_basic_verify() doesn't set errno, so use tls_set_errorx()
tb [Tue, 23 Mar 2021 20:04:29 +0000 (20:04 +0000)]
OCSP_basic_verify() doesn't set errno, so use tls_set_errorx()

ok inoguchi

3 years agochange pfIfDescr and pfLogIfName from plain OCTET STRING (which has no
sthen [Tue, 23 Mar 2021 19:37:51 +0000 (19:37 +0000)]
change pfIfDescr and pfLogIfName from plain OCTET STRING (which has no
textual-convention so is sometimes printed as hex dump) to DisplayString
(ascii).

likewise change pfLabelName and pfTblName to SnmpAdminString (UTF-8
textual-convention).

feedback/tweaks (notably pointing out UTF-8)/ok martijn@

3 years agoUse a pointer called bufp to point to a buffer called bufn
lum [Tue, 23 Mar 2021 18:40:29 +0000 (18:40 +0000)]
Use a pointer called bufp to point to a buffer called bufn
consistantly.