openbsd
2 years agosync
deraadt [Tue, 14 Dec 2021 20:52:47 +0000 (20:52 +0000)]
sync

2 years agotweak for the generated source
tb [Tue, 14 Dec 2021 20:37:24 +0000 (20:37 +0000)]
tweak for the generated source

2 years agomore symbols that are postponed or intentionally undocumented and
schwarze [Tue, 14 Dec 2021 20:21:45 +0000 (20:21 +0000)]
more symbols that are postponed or intentionally undocumented and
some regexp tweaks; the relevant parts of asn1.h are nearing completion

2 years agoforgotten .Dv macros in -column lists
schwarze [Tue, 14 Dec 2021 20:14:22 +0000 (20:14 +0000)]
forgotten .Dv macros in -column lists

2 years agoadd roff(7) comments listing some M_ASN1_* aliases
schwarze [Tue, 14 Dec 2021 19:36:18 +0000 (19:36 +0000)]
add roff(7) comments listing some M_ASN1_* aliases
that are intentionally undocumented

2 years agodelete incorrect comment about sys/cdefs.h
deraadt [Tue, 14 Dec 2021 18:16:14 +0000 (18:16 +0000)]
delete incorrect comment about sys/cdefs.h

2 years agoTo cache lookups, the policy ipo is linked to its SA tdb. There
bluhm [Tue, 14 Dec 2021 17:50:37 +0000 (17:50 +0000)]
To cache lookups, the policy ipo is linked to its SA tdb.  There
is also a list of SAs that belong to a policy.  To make it MP safe,
protect these pointers with a mutex.
tested by Hrvoje Popovski; OK mvs@

2 years agoConsolidate ASN.1 universal tag type data.
jsing [Tue, 14 Dec 2021 17:35:21 +0000 (17:35 +0000)]
Consolidate ASN.1 universal tag type data.

There are currently three different tables in three different files that
contain information about ASN.1 universal class tag types. Range checking
is also implemented in three different places (with different
implementations).

Consolidate all of this into a single table, provide a lookup function that
deals with the range checks and wrappers to deal with specific types.

ok inoguchi@ tb@

2 years agoAdd regress coverage for ASN1_get_object()
jsing [Tue, 14 Dec 2021 17:10:02 +0000 (17:10 +0000)]
Add regress coverage for ASN1_get_object()

2 years agoAdd regress for ASN1_tag2bit() and ASN1_tag2str()
jsing [Tue, 14 Dec 2021 17:07:57 +0000 (17:07 +0000)]
Add regress for ASN1_tag2bit() and ASN1_tag2str()

2 years agoAdd new 'unsopassgc' test. This test tries to beak unix(4) sockets garbage
mvs [Tue, 14 Dec 2021 16:12:48 +0000 (16:12 +0000)]
Add new 'unsopassgc' test. This test tries to beak unix(4) sockets garbage
collector and make it to clean `so_rcv' buffer of alive socket. Successful
breakage should produce kernel panic.

ok bluhm@ mpi@

2 years agoMove 'unixsock' test from regress/sys/kern/unixsock/ to
mvs [Tue, 14 Dec 2021 15:57:57 +0000 (15:57 +0000)]
Move 'unixsock' test from regress/sys/kern/unixsock/ to
regress/sys/kern/unixsockets/.

ok claudio@

2 years agoRemember to clear __EV_HUP when the other end of the FIFO has re-opened.
visa [Tue, 14 Dec 2021 15:53:42 +0000 (15:53 +0000)]
Remember to clear __EV_HUP when the other end of the FIFO has re-opened.

2 years agodocument the very quirky behaviour of the SMIME_OLDMIME flag
schwarze [Tue, 14 Dec 2021 15:46:48 +0000 (15:46 +0000)]
document the very quirky behaviour of the SMIME_OLDMIME flag

2 years agoCover all state checks and updates with spltty() in filt_ttyread().
visa [Tue, 14 Dec 2021 15:32:20 +0000 (15:32 +0000)]
Cover all state checks and updates with spltty() in filt_ttyread().

2 years agonew manual page SMIME_text(3)
schwarze [Tue, 14 Dec 2021 15:22:49 +0000 (15:22 +0000)]
new manual page SMIME_text(3)

2 years agonew manual page SMIME_read_ASN1(3)
schwarze [Tue, 14 Dec 2021 14:30:50 +0000 (14:30 +0000)]
new manual page SMIME_read_ASN1(3)
using parts of the text from SMIME_read_CMS(3) and SMIME_read_PKCS7(3)

2 years agoMove raw pubkey bytes to EVP_PKEY conversion to common function.
tobhe [Tue, 14 Dec 2021 13:44:36 +0000 (13:44 +0000)]
Move raw pubkey bytes to EVP_PKEY conversion to common function.

ok markus@

2 years agodrm/syncobj: Deal with signalled fences in drm_syncobj_find_fence.
jsg [Tue, 14 Dec 2021 13:32:09 +0000 (13:32 +0000)]
drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence.

From Bas Nieuwenhuizen
2737d0bc21b6db199b4145e12b9f1745577d7944 in linux 5.10.y/5.10.85
b19926d4f3a660a8b76e5d989ffd1168e619a5c4 in mainline linux

2 years agodrm/amdkfd: fix boot failure when iommu is disabled in Picasso.
jsg [Tue, 14 Dec 2021 13:29:50 +0000 (13:29 +0000)]
drm/amdkfd: fix boot failure when iommu is disabled in Picasso.

From Yifan Zhang
f3d9114ac99f4358809f44b390b304b8b53fb4a4 in linux 5.10.y/5.10.85
afd18180c07026f94a80ff024acef5f4159084a4 in mainline linux

2 years agodrm/amdgpu: init iommu after amdkfd device init
jsg [Tue, 14 Dec 2021 13:28:06 +0000 (13:28 +0000)]
drm/amdgpu: init iommu after amdkfd device init

From Yifan Zhang
7508a9aa65b959bbc6d9e42c9683520bddb7db0d in linux 5.10.y/5.10.85
714d9e4574d54596973ee3b0624ee4a16264d700 in mainline linux

2 years agodrm/amdgpu: move iommu_resume before ip init/resume
jsg [Tue, 14 Dec 2021 13:25:51 +0000 (13:25 +0000)]
drm/amdgpu: move iommu_resume before ip init/resume

From James Zhu
ac9db04ee32f007e48cb0763784ccfadd5a21342 in linux 5.10.y/5.10.85
f02abeb0779700c308e661a412451b38962b8a0b in mainline linux

2 years agodrm/amdgpu: add amdgpu_amdkfd_resume_iommu
jsg [Tue, 14 Dec 2021 13:24:12 +0000 (13:24 +0000)]
drm/amdgpu: add amdgpu_amdkfd_resume_iommu

From James Zhu
fe9dca7dda61f8f3b3000df2abe88c60d1bfab93 in linux 5.10.y/5.10.85
8066008482e533e91934bee49765bf8b4a7c40db in mainline linux

2 years agodrm/amdkfd: separate kfd_iommu_resume from kfd_resume
jsg [Tue, 14 Dec 2021 13:22:32 +0000 (13:22 +0000)]
drm/amdkfd: separate kfd_iommu_resume from kfd_resume

From James Zhu
5d191b0976b72af5f79cf217b9b7c2f20b522a2a in linux 5.10.y/5.10.85
fefc01f042f44ede373ee66773b8238dd8fdcb55 in mainline linux

2 years agodrm/amd/amdkfd: adjust dummy functions' placement
jsg [Tue, 14 Dec 2021 13:20:09 +0000 (13:20 +0000)]
drm/amd/amdkfd: adjust dummy functions' placement

From Lang Yu
46dcf66d6e7a64febe0575c62679287679dcb2b3 in linux 5.10.y/5.10.85
cd63989e0e6aa2eb66b461f2bae769e2550e47ac in mainline linux

2 years agouse bus_space_read_region_1() when reading bios from pci rom
jsg [Tue, 14 Dec 2021 12:48:15 +0000 (12:48 +0000)]
use bus_space_read_region_1() when reading bios from pci rom

Avoids 'BIOS signature incorrect 0 0' warning seen on sparc64
(where pci is mapped little endian) reported by Ted Bullock.

2 years agoIO::Socket::IP non-blocking connect works a bit differently than
bluhm [Tue, 14 Dec 2021 12:37:49 +0000 (12:37 +0000)]
IO::Socket::IP non-blocking connect works a bit differently than
IO::Socket::INET6.  Tweak the non-blocking for connect in the
sosplice scapy test.

2 years agoUse "rng-seed" and "kaslr-seed" properties from the device tree to mix in
kettenis [Tue, 14 Dec 2021 11:05:37 +0000 (11:05 +0000)]
Use "rng-seed" and "kaslr-seed" properties from the device tree to mix in
some extra entropy.

ok deraadt@

2 years agoDon't overwrite the Raspberry Pi config.txt if it already exists.
kettenis [Tue, 14 Dec 2021 11:01:58 +0000 (11:01 +0000)]
Don't overwrite the Raspberry Pi config.txt if it already exists.

ok sthen@, jsg@, deraadt@

2 years agoImplement support for selecting SGMII or SerDes mode depending on the
patrick [Tue, 14 Dec 2021 10:48:10 +0000 (10:48 +0000)]
Implement support for selecting SGMII or SerDes mode depending on the
plugged-in SFP transceiver and for reading out transceiver information
via ifconfig(8).  To read from the SFP, we need to let the card issue
I2C transfers.  Additionally we need I2C to read/write to the PHY when
MDIO is not available.  Depending on the SFP's supported media types
we can decide which mode to use.

This fixes hardware-initialization and link-up problems with some em(4)
Fiber NIC and SFP combinations.

Tested by dlg@ and been in snaps for quite a while
ok dlg@ jmatthew@

2 years agoA better approach is to defined __CONCAT locally
deraadt [Tue, 14 Dec 2021 07:20:16 +0000 (07:20 +0000)]
A better approach is to defined __CONCAT locally

2 years agosys/signal.h before sys/proc.h
deraadt [Tue, 14 Dec 2021 06:28:13 +0000 (06:28 +0000)]
sys/signal.h before sys/proc.h

2 years agoMINIMUM() because of no sys/param.h
deraadt [Tue, 14 Dec 2021 06:27:48 +0000 (06:27 +0000)]
MINIMUM() because of no sys/param.h

2 years agoadd missing sys/time.h include
anton [Tue, 14 Dec 2021 06:26:15 +0000 (06:26 +0000)]
add missing sys/time.h include

2 years agoSigh. This sys/cdefs.h is hiding use of __CONCAT in a non-C context.
deraadt [Tue, 14 Dec 2021 02:17:39 +0000 (02:17 +0000)]
Sigh.  This sys/cdefs.h is hiding use of __CONCAT in a non-C context.
Needs some other repairs first.

2 years agoadd pclk clock used by dwdog(4) on RK3399
chrisz [Mon, 13 Dec 2021 20:59:23 +0000 (20:59 +0000)]
add pclk clock used by dwdog(4) on RK3399

ok kettenis@

2 years agoFix asprintf() error check. Portable code should check the return
tb [Mon, 13 Dec 2021 19:47:40 +0000 (19:47 +0000)]
Fix asprintf() error check. Portable code should check the return
value for -1, not buf == NULL.

ok tobhe

2 years agoFix a few leaks due to X509_NAME_oneline(name, NULL, 0) dynamically
tb [Mon, 13 Dec 2021 19:46:22 +0000 (19:46 +0000)]
Fix a few leaks due to X509_NAME_oneline(name, NULL, 0) dynamically
allocating a buffer.

ok tobhe

2 years agonew manual page PEM_write_bio_ASN1_stream(3);
schwarze [Mon, 13 Dec 2021 18:55:22 +0000 (18:55 +0000)]
new manual page PEM_write_bio_ASN1_stream(3);
certainly not perfect, but arguably better than the even terser
PEM_write_bio_CMS_stream(3) and PEM_write_bio_PKCS7_stream(3)

2 years agosync
deraadt [Mon, 13 Dec 2021 18:55:03 +0000 (18:55 +0000)]
sync

2 years agotee(1): increase I/O buffer size from 8KB to 64KB
cheloha [Mon, 13 Dec 2021 18:33:23 +0000 (18:33 +0000)]
tee(1): increase I/O buffer size from 8KB to 64KB

64KB strikes a good balance between space and time on today's
machines.  Buffers smaller than 64KB waste more time in userspace
traveling to and from the kernel.  Buffers larger than 64KB do I/O a
bit faster, but the performance improvements rapidly diminish at a
steep memory cost.

Discussed with millert@ and deraadt@.  Positive feedback from Geoff
Steckel.

Thread: https://marc.info/?l=openbsd-tech&m=163737586414354&w=2

ok millert@ deraadt@

2 years agoincluding sys/cdefs.h manually started as a result of netbsd trying to
deraadt [Mon, 13 Dec 2021 18:28:39 +0000 (18:28 +0000)]
including sys/cdefs.h manually started as a result of netbsd trying to
macro-build a replacement for sccsid, and was done without any concern
for namespace damage.  Unfortunately this practice started infecting
other code as others were unaware they didn't need the file.
ok millert guenther

2 years agoAvoid a potential double free in group_free()
tb [Mon, 13 Dec 2021 18:06:56 +0000 (18:06 +0000)]
Avoid a potential double free in group_free()

In the unlikely event that EC_KEY_check_key() in ec_init() fails,
the group would be freed twice: once in ec_init(), and later in
group_free().

ok tobhe

2 years agoKill sys/cdefs.h includes, because overly complicated include+macro
deraadt [Mon, 13 Dec 2021 18:04:28 +0000 (18:04 +0000)]
Kill sys/cdefs.h includes, because overly complicated include+macro
for a sccsid replacement scheme which results an namespace damage
is an unfair trade
ok bluhm

2 years agoRemove the last internal use of d2i_ASN1_BOOLEAN.
tb [Mon, 13 Dec 2021 17:58:41 +0000 (17:58 +0000)]
Remove the last internal use of d2i_ASN1_BOOLEAN.

From Stephen Henson, OpenSSL 564df0dd

ok jsing

2 years agoClean up d2i_ASN1_BOOLEAN() and i2d_ASN1_BOOLEAN().
jsing [Mon, 13 Dec 2021 17:56:15 +0000 (17:56 +0000)]
Clean up d2i_ASN1_BOOLEAN() and i2d_ASN1_BOOLEAN().

Convert these to templated ASN.1, given we already have ASN1_BOOLEAN_it.

ok inoguchi@ tb@

2 years agothis file doesn't use anything from <stdio.h>;
schwarze [Mon, 13 Dec 2021 17:55:53 +0000 (17:55 +0000)]
this file doesn't use anything from <stdio.h>;
in particular, NULL is also in <stdlib.h> according to the C99 standard;
"free commit" tb@

2 years agoConvert asn1_d2i_ex_primitive()/asn1_collect() from BUF_MEM to CBB.
jsing [Mon, 13 Dec 2021 17:50:24 +0000 (17:50 +0000)]
Convert asn1_d2i_ex_primitive()/asn1_collect() from BUF_MEM to CBB.

With this we get simpler code, overflow checking and more sensible
memory ownership. Also switch the free_cont case to freezero() since this
could contain secrets.

ok inoguchi@ tb@

2 years agoCleanup libcrypto memory management. Remove redundant NULL checks
tobhe [Mon, 13 Dec 2021 17:35:34 +0000 (17:35 +0000)]
Cleanup libcrypto memory management.  Remove redundant NULL checks
before calling *_free() functions.  Use 'get0' functions where it
makes sense to avoid some frees.

Feedback and ok tb@

2 years agonew manual page SMIME_write_ASN1(3);
schwarze [Mon, 13 Dec 2021 17:24:39 +0000 (17:24 +0000)]
new manual page SMIME_write_ASN1(3);
still vague in various respects, but it's a start

2 years agoremove a couple hundred sys/param.h includes in userland code, and
deraadt [Mon, 13 Dec 2021 16:56:48 +0000 (16:56 +0000)]
remove a couple hundred sys/param.h includes in userland code, and
also whack some sys/cdefs.h early includes which is such a brutally
bad pattern
ok bluhm mbuhl

2 years agoacct(4) ac_tty shouldn't need NODEV from sys/param.h (which is kernel API),
deraadt [Mon, 13 Dec 2021 16:37:37 +0000 (16:37 +0000)]
acct(4) ac_tty shouldn't need NODEV from sys/param.h (which is kernel API),
-1 is sufficient to indicate the process had no controlling tty, removing
one more sys/param.h include in our userland
ok millert

2 years agoOnly generate a new xid on state change.
florian [Mon, 13 Dec 2021 16:12:10 +0000 (16:12 +0000)]
Only generate a new xid on state change.

When we first request a lease (INIT or REBOOTING state) we run with
very short timeouts. If the dhcp server is slow to respond we already
have a new xid and ignore the server's response. This goes on until we
increase the timeout high enough. If we just stick to an xid this will
not happen and we accept "late" responses.

RFC 2131 has:
Selecting a new 'xid' for each retransmission is an implementation
decision.  A client may choose to reuse the same 'xid' or select a new
'xid' for each retransmitted message.

Problem seen by phessler on german train wifi.
OK phessler

2 years agoRevise EVFILT_EXCEPT filters
visa [Mon, 13 Dec 2021 14:56:55 +0000 (14:56 +0000)]
Revise EVFILT_EXCEPT filters

Restrict the circumstances where EVFILT_EXCEPT filters trigger:
* when out-of-band data is present and NOTE_OOB is requested.
* when the channel is fully closed and consumer is poll(2).

This should clarify the logic and suppress events that kqueue-based
poll(2) does not except.

OK mpi@

2 years agoPrevent kevent(2) use of EVFILT_EXCEPT with FIFOs and pipes
visa [Mon, 13 Dec 2021 14:54:22 +0000 (14:54 +0000)]
Prevent kevent(2) use of EVFILT_EXCEPT with FIFOs and pipes

Currently, the only intended direct usage of the EVFILT_EXCEPT filter
is with NOTE_OOB to detect out-of-band data in ptys and sockets.
NOTE_OOB does not apply to FIFOs or pipes. Prevent the user from
registering the filter with these file types. The filter code is for
the kernel's internal use.

OK mpi@

2 years agond6_dad_ns_input() could trigger a NULL deref in nd6_dad_duplicated().
bluhm [Mon, 13 Dec 2021 14:30:16 +0000 (14:30 +0000)]
nd6_dad_ns_input() could trigger a NULL deref in nd6_dad_duplicated().
It checks dp in two of three places.  One check got lost in revision
1.83.  Do a dp == NULL once at the beginning.
OK jsg@
Reported-by: syzbot+88c0ce914a0b10b7e1c8@syzkaller.appspotmail.com
2 years agoCatch integer overflow rather than silently truncating while
schwarze [Mon, 13 Dec 2021 14:06:17 +0000 (14:06 +0000)]
Catch integer overflow rather than silently truncating while
parsing MASK: strings in ASN1_STRING_set_default_mask_asc(3).
Issue noticed by tb@, patch by me, two additional #include lines from tb@.
OK tb@.

2 years agoHandle multi-port controllers in uslcom(4)
visa [Mon, 13 Dec 2021 13:57:48 +0000 (13:57 +0000)]
Handle multi-port controllers in uslcom(4)

A multi-port CP210x device presents each COM port as a separate USB
virtual COM port interface. When attaching uslcom(4), take the USB
interface from the attach arguments instead of using interface 0.
This lets the driver access the different ports of a quad-port CP2108.

Tested with a single-port CP2102 by jsg@

OK jsg@ deraadt@

2 years agonew manual pages i2d_ASN1_bio_stream(3) and SMIME_crlf_copy(3)
schwarze [Mon, 13 Dec 2021 13:46:09 +0000 (13:46 +0000)]
new manual pages i2d_ASN1_bio_stream(3) and SMIME_crlf_copy(3)

2 years agoLet dnsproc pass multiple addresses to netproc
jca [Mon, 13 Dec 2021 13:30:39 +0000 (13:30 +0000)]
Let dnsproc pass multiple addresses to netproc

The loop was exited prematurely because of a stray break statement.
In case of a failure to connect to the first address returned by
getaddrinfo(3), acme-client can now try to connect using another address
or address family if available.

ok florian@

2 years agoTreat xid as a uint32_t in network byte order on the wire.
florian [Mon, 13 Dec 2021 11:03:23 +0000 (11:03 +0000)]
Treat xid as a uint32_t in network byte order on the wire.

Internally this doesn't matter since we only care about equality.
This makes logging output comparable to tcpdump(8).

Pointed out by joel@
OK claudio

2 years agoReplace struct member assignment with struct assignment to make the
florian [Mon, 13 Dec 2021 11:02:26 +0000 (11:02 +0000)]
Replace struct member assignment with struct assignment to make the
code more compact. No binary change.
OK claudio

2 years agoMake pane-border-format a pane option, GitHub issue 2999.
nicm [Mon, 13 Dec 2021 09:42:20 +0000 (09:42 +0000)]
Make pane-border-format a pane option, GitHub issue 2999.

2 years agoremove unused variable to fix build with llvm 13
jsg [Sun, 12 Dec 2021 22:54:35 +0000 (22:54 +0000)]
remove unused variable to fix build with llvm 13
ok jca@ naddy@

2 years agoAnnotate the structs that will be moved to hmac_local.h and evp_locl.h
tb [Sun, 12 Dec 2021 21:35:46 +0000 (21:35 +0000)]
Annotate the structs that will be moved to hmac_local.h and evp_locl.h
in an upcoming bump.  This omits EVP_AEAD_CTX which will be dealt with
separately. EVP_CIPHER_INFO internals are still publicly visible in
OpenSSL, so it won't be moved.

Move typedefs for HMAC_CTX and EVP_ENCODE_CTX to ossl_typ.h.  These
typedefs will be visible by files including only hmac.h or evp.h since
hmac.h includes evp.h and evp.h includes ossl_typ.h.

ok inoguchi

2 years agoInclude evp_locl.h where it will be needed once most structs from
tb [Sun, 12 Dec 2021 21:30:13 +0000 (21:30 +0000)]
Include evp_locl.h where it will be needed once most structs from
evp.h will be moved to evp_locl.h in an upcoming bump.

ok inoguchi

2 years agoAdd a mostly empty hmac_local.h. HMAC_CTX and a few other things
tb [Sun, 12 Dec 2021 21:27:37 +0000 (21:27 +0000)]
Add a mostly empty hmac_local.h. HMAC_CTX and a few other things
from hmac.h will be moved there in an umpcoming bump. Include this
file where it will be needed.

ok inoguchi

2 years agoAdd -I${LIBCRYPTO_SRC}/hmac to CFLAGS. Needed in an upcoming commit.
tb [Sun, 12 Dec 2021 21:23:47 +0000 (21:23 +0000)]
Add -I${LIBCRYPTO_SRC}/hmac to CFLAGS. Needed in an upcoming commit.

ok inoguchi

2 years agoAdd header guards to evp_locl.h.
tb [Sun, 12 Dec 2021 21:21:58 +0000 (21:21 +0000)]
Add header guards to evp_locl.h.

ok inoguchi

2 years agoReplace deprecated IO::Socket::INET6 with IO::Socket::IP.
bluhm [Sun, 12 Dec 2021 21:16:53 +0000 (21:16 +0000)]
Replace deprecated IO::Socket::INET6 with IO::Socket::IP.

2 years agoConvert req.c to compile with opaque EVP_MD_CTX.
tb [Sun, 12 Dec 2021 20:42:37 +0000 (20:42 +0000)]
Convert req.c to compile with opaque EVP_MD_CTX.

ok inoguchi

2 years agoConvert passwd.c to opaque EVP_MD_CTX and add a bit of error checking.
tb [Sun, 12 Dec 2021 20:40:25 +0000 (20:40 +0000)]
Convert passwd.c to opaque EVP_MD_CTX and add a bit of error checking.

tweak/ok inoguchi

2 years agoMake speed.c compile with opaque EVP_CIPHER, EVP_MD and HMAC_CTX.
tb [Sun, 12 Dec 2021 20:35:40 +0000 (20:35 +0000)]
Make speed.c compile with opaque EVP_CIPHER, EVP_MD and HMAC_CTX.

ok inoguchi

2 years agoA few more simplifications using get0_pubkey instead of get_pubkey + free.
tb [Sun, 12 Dec 2021 20:34:04 +0000 (20:34 +0000)]
A few more simplifications using get0_pubkey instead of get_pubkey + free.

2 years agoSimplify x509.c slightly by using X509_get0_pubkey() instead of
tb [Sun, 12 Dec 2021 20:29:15 +0000 (20:29 +0000)]
Simplify x509.c slightly by using X509_get0_pubkey() instead of
X509_get_pubkey()

ok inoguchi

2 years agoMake x509.c compile with opaque EVP_PKEY.
tb [Sun, 12 Dec 2021 20:28:02 +0000 (20:28 +0000)]
Make x509.c compile with opaque EVP_PKEY.

ok inoguchi

2 years agoUse correct spelling of NULL
tb [Sun, 12 Dec 2021 20:22:59 +0000 (20:22 +0000)]
Use correct spelling of NULL

ok inoguchi

2 years agoMake ts.c compile with opaque EVP_MD_CTX.
tb [Sun, 12 Dec 2021 20:22:08 +0000 (20:22 +0000)]
Make ts.c compile with opaque EVP_MD_CTX.

ok inoguchi

2 years agodocument the ub_* constants
schwarze [Sun, 12 Dec 2021 20:16:36 +0000 (20:16 +0000)]
document the ub_* constants

2 years agotypo
schwarze [Sun, 12 Dec 2021 18:15:43 +0000 (18:15 +0000)]
typo

2 years agoNew manual page providing a rudimentary description of BIO_new_NDEF(3).
schwarze [Sun, 12 Dec 2021 17:31:18 +0000 (17:31 +0000)]
New manual page providing a rudimentary description of BIO_new_NDEF(3).
The API surrounding this is so complicated and streaming is so rarely
used in practice that describing this in more detail is not a priority
right now.  The documentation of the wrapper BIO_new_CMS(3) is also
rather vague, and BIO_new_PKCS7() isn't described at all so far.

2 years agoRewrite X509_ALGOR_set_md() without reaching into EVP_MD.
tb [Sun, 12 Dec 2021 14:27:20 +0000 (14:27 +0000)]
Rewrite X509_ALGOR_set_md() without reaching into EVP_MD.

ok inoguchi schwarze

2 years agoReplace deprecated IO::Socket::INET6 with IO::Socket::IP.
bluhm [Sun, 12 Dec 2021 10:56:49 +0000 (10:56 +0000)]
Replace deprecated IO::Socket::INET6 with IO::Socket::IP.

2 years agoUse vnode parameter instead of vfinddev() in mfs_strategy()
visa [Sun, 12 Dec 2021 09:17:17 +0000 (09:17 +0000)]
Use vnode parameter instead of vfinddev() in mfs_strategy()

Getting the mfs device vnode through vfinddev() is more complex than
necessary. Also, the indirection is not robust.

OK mpi@

2 years agoAdd vnode parameter to VOP_STRATEGY()
visa [Sun, 12 Dec 2021 09:14:58 +0000 (09:14 +0000)]
Add vnode parameter to VOP_STRATEGY()

Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
the correct vop_strategy callback. Now the vnode is also available
in the callback.

OK mpi@

2 years agoMerge two bugfixes in ASN1_STRING_TABLE_add(3) and ASN1_STRING_TABLE_get(3)
schwarze [Sat, 11 Dec 2021 22:58:48 +0000 (22:58 +0000)]
Merge two bugfixes in ASN1_STRING_TABLE_add(3) and ASN1_STRING_TABLE_get(3)
from the OpenSSL 1.1.1 branch, which is still under a free license,
mostly this commit:

commit d35c0ff30b31be9fd5dcf3d552a16feb8de464bc
Author: Dr. Stephen Henson <steve@openssl.org>
Date: Fri Oct 19 15:06:31 2012 +0000
fix ASN1_STRING_TABLE_add so it can override existing string table values

This fixes a segfault in ASN1_STRING_TABLE_add(3), which tried to change a
static const entry when called with an nid already in the default table,
and it switches the precedence of the two tables in ASN1_STRING_TABLE_get(3).

In addition, it changes behaviour in the following minor ways:
* Ignore negative minsize and maxsize arguments, not just -1.
* Ignore a zero mask and zero flags.
It's unclear whether these additional changes make the API absolutely
better, but we want compatibility with OpenSSL in these functions.

Tweaks & OK tb@.

2 years agoMerge the deletion of <ctype.h>, which isn't used here,
schwarze [Sat, 11 Dec 2021 22:34:36 +0000 (22:34 +0000)]
Merge the deletion of <ctype.h>, which isn't used here,
and some style improvements from the OpenSSL 1.1.1 branch,
which is still under a free license.
No functional change.
OK and additional tweaks tb@.

2 years agoChange compatible string to something that makes more sense.
kettenis [Sat, 11 Dec 2021 20:36:26 +0000 (20:36 +0000)]
Change compatible string to something that makes more sense.

2 years agoremove unused variable to fix build with llvm 13; ok jca@
naddy [Sat, 11 Dec 2021 20:11:17 +0000 (20:11 +0000)]
remove unused variable to fix build with llvm 13; ok jca@

2 years agoStart the default OpenBSD partition either immediately following
krw [Sat, 11 Dec 2021 20:09:28 +0000 (20:09 +0000)]
Start the default OpenBSD partition either immediately following
any boot partition specified via '-b' or /usr/mdec/mbr; at the
power of 2 block after the first track; or immediately following
the MBR if there is only one track.

Mark any non-EFISYS boot partition created by -b as DOSACTIVE.
Suggested by kettenis@, better than a separate new option.

Brings -b behaviour into line with many uses of -e to create boot
partitions, allowing for the eventual elimination of said -e uses
in the creation of the various boot media and in the install
scripts.

2 years agoAdd support for interrupts represented by ACPI PCI Interrupt Link Devices.
kettenis [Sat, 11 Dec 2021 20:07:27 +0000 (20:07 +0000)]
Add support for interrupts represented by ACPI PCI Interrupt Link Devices.
This makes PCI interrupts work on QEMU's SBSA target.

ok patrick@

2 years agoThanks to the reverse engineering efforts by Hector Martin, we now know
kettenis [Sat, 11 Dec 2021 20:04:37 +0000 (20:04 +0000)]
Thanks to the reverse engineering efforts by Hector Martin, we now know
that we can controll the CS# pin directly from the SPI controller itself.
Add support for this as future device trees will probably use this mode
instead of explicitly specifying a "cs-gpios" property.

ok patrick@

2 years agoAttach apldart(4) early.
kettenis [Sat, 11 Dec 2021 19:45:05 +0000 (19:45 +0000)]
Attach apldart(4) early.

2 years agodocument STABLE_NO_MASK and STABLE_FLAGS_MALLOC,
schwarze [Sat, 11 Dec 2021 18:51:25 +0000 (18:51 +0000)]
document STABLE_NO_MASK and STABLE_FLAGS_MALLOC,
mention which argument values can be used to not change the respective fields,
and tweak a few additional wordings

2 years agotwo more "the the" fixes;
jmc [Sat, 11 Dec 2021 17:25:10 +0000 (17:25 +0000)]
two more "the the" fixes;

2 years agoProtect the write access to the TDB flags field with a mutex per
bluhm [Sat, 11 Dec 2021 16:33:46 +0000 (16:33 +0000)]
Protect the write access to the TDB flags field with a mutex per
TDB.  Clearing the timeout flags just before pool put in tdb_free()
does not make sense.  Move this to tdb_delete().  While there make
the parentheses in the flag check consistent.
tested by Hrvoje Popovski; OK tobhe@

2 years agodoubled word; from Leon Fischer
tb [Sat, 11 Dec 2021 13:34:38 +0000 (13:34 +0000)]
doubled word; from Leon Fischer

2 years agoClarify usage of __EV_POLL and __EV_SELECT
visa [Sat, 11 Dec 2021 09:28:26 +0000 (09:28 +0000)]
Clarify usage of __EV_POLL and __EV_SELECT

Make __EV_POLL specific to kqueue-based poll(2), to remove overlap
with __EV_SELECT that only select(2) uses.

OK millert@ mpi@

2 years agoStop passing __FILE__ and __LINE__ to various libcrypto functions. The arguments
anton [Sat, 11 Dec 2021 07:38:03 +0000 (07:38 +0000)]
Stop passing __FILE__ and __LINE__ to various libcrypto functions. The arguments
are unused in the end anyway and occupies needless space, especially in ftp(1)
shipped with the ramdisk.

ok tb@

2 years agofix a copy-and-paste error;
schwarze [Fri, 10 Dec 2021 17:26:54 +0000 (17:26 +0000)]
fix a copy-and-paste error;
from Richard Ulmer <... rulmer at mailbox dot org>