openbsd
2 years agoHook up the new application layer.
martijn [Wed, 19 Jan 2022 11:00:56 +0000 (11:00 +0000)]
Hook up the new application layer.

OK jmatthew@
tested as part of larger diff by sthen@ and Joel Carnat

2 years agoAdd the new application layer. Changes include:
martijn [Wed, 19 Jan 2022 10:59:35 +0000 (10:59 +0000)]
Add the new application layer. Changes include:
- Asynchronous design, which should allow us to cleanly implement agentx
  support.
- Cluster requests when sending them to backends
- Return a better error code in a lot of cases.
- Allow bulkget to return row by row instead of column by column (as per
  RFC3416)
- Better SNMPv1 mapping as per RFC3584
- Allow registration of overlapping regions.
- Stricter OID comparison.
- We loose write support. Previous write support didn't guarantee
  atomicity, wasn't persistent across restarts and didn't implement
  anything useful. This can be added later if it's missed.
- This is quite a bit slower, but this should clear up once the current
  mps.c and mib.c code gets pushed out. Other tricks could help speed
  things up, but I don't want to resort to extra tricks if it's not needed.
- More detailed debugging output.

This commit is stand-alone and gets hooked in with the following commit.

"Looks good at first glance" benno@
minor issues pointed out by and OK jmatthew@
Performance loss aceptable to sthen@
tested as part of larger diff by sthen@ and Joel Carnat

2 years agoOn SDHC version 3.0 controllers the divisor doesn't have to be a power
patrick [Wed, 19 Jan 2022 10:51:04 +0000 (10:51 +0000)]
On SDHC version 3.0 controllers the divisor doesn't have to be a power
of two, but can be a multiple of two.  Make use of this to achieve card
clock frequencies closer to the target frequency.

ok visa@

2 years agoGrab the kernel lock in uvm_wxcheck() when aborting the process
kn [Wed, 19 Jan 2022 10:43:48 +0000 (10:43 +0000)]
Grab the kernel lock in uvm_wxcheck() when aborting the process

kern.wxabort=1 logs and kills programs after W^X violations.
At least sigexit() -> coredump() as well as the non-atomic increment of
ps_wxcounter require protection, so grab the big lock for the entire block.

This is part of the effort to unlock mmap(2)'s MAP_ANON case.

Feedback mvs claudio kettenis deraadt
OK kettenis

2 years agoImplement snmpe_send to allow to allow the new application layer to send
martijn [Wed, 19 Jan 2022 10:36:35 +0000 (10:36 +0000)]
Implement snmpe_send to allow to allow the new application layer to send
messages through the current transport mapping code.

OK jmatthew@
tested as part of larger diff by sthen@ and Joel Carnat

2 years agoMake sure that we ASN1 verify the varbindlist as soon as we unpack it.
martijn [Wed, 19 Jan 2022 10:28:13 +0000 (10:28 +0000)]
Make sure that we ASN1 verify the varbindlist as soon as we unpack it.

OK jmatthew@
tested as part of larger diff by sthen@ and Joel Carnat

2 years agoAdd definitions for SNMP-TARGET-MIB. These are needed for the new
martijn [Wed, 19 Jan 2022 10:26:37 +0000 (10:26 +0000)]
Add definitions for SNMP-TARGET-MIB. These are needed for the new
application layer.

OK jmatthew@
tested as part of larger diff by sthen@ and Joel Carnat

2 years agoMove some smi.c functions to their own header.
martijn [Wed, 19 Jan 2022 10:25:04 +0000 (10:25 +0000)]
Move some smi.c functions to their own header.
These are needed for a new application layer, where a lot of the snmpd.h
stuff just clutter.

OK jmatthew@
tested as part of larger diff by sthen@ and Joel Carnat

2 years agoMove some snmpe.c functions to their own header.
martijn [Wed, 19 Jan 2022 10:22:48 +0000 (10:22 +0000)]
Move some snmpe.c functions to their own header.
These functions are needed from the new application layer and don't
really belong in snmpd.h.

OK jmatthew@
tested as part of larger diff by sthen@ and Joel Carnat

2 years agoMove log.c functions to their own header.
martijn [Wed, 19 Jan 2022 10:19:27 +0000 (10:19 +0000)]
Move log.c functions to their own header.
This is needed for a new application layer where, where a lot of the
snmpd.h stuff just clutter.

Requested by benno@
OK jmatthew@
tested as part of larger diff by sthen@ and Joel Carnat

2 years agorpki-client: don't leak nfile if no repo is found.
tb [Wed, 19 Jan 2022 09:22:51 +0000 (09:22 +0000)]
rpki-client: don't leak nfile if no repo is found.

ok claudio

2 years agoAdd missing x509_init_oid() calls in regress tests.
claudio [Wed, 19 Jan 2022 08:24:43 +0000 (08:24 +0000)]
Add missing x509_init_oid() calls in regress tests.
Found by anton@

2 years agoRemove temporary verbose logging.
anton [Wed, 19 Jan 2022 06:46:55 +0000 (06:46 +0000)]
Remove temporary verbose logging.

2 years agogo back to rev 1.5 of irq_work.h with tasks on system_wq
jsg [Wed, 19 Jan 2022 05:36:54 +0000 (05:36 +0000)]
go back to rev 1.5 of irq_work.h with tasks on system_wq
this may further help people with recent gen intel machines

2 years agono longer need to disable -Wtautological-compare and
jsg [Wed, 19 Jan 2022 02:49:05 +0000 (02:49 +0000)]
no longer need to disable -Wtautological-compare and
-Wunneeded-internal-declaration when building drm with clang

2 years agomove some unused functions under ifdef
jsg [Wed, 19 Jan 2022 02:20:06 +0000 (02:20 +0000)]
move some unused functions under ifdef

2 years agoComment out an incorrect lock assertion.
mpi [Wed, 19 Jan 2022 02:08:24 +0000 (02:08 +0000)]
Comment out an incorrect lock assertion.

The swap code path in uvm_aio_aiodone() is not holding the corresponding
page lock and shouldn't as long as anons are locked inside uvm_page_unbusy()
to handle the PG_RELEASED case.

Reported by Ralf Horstmann on bugs@

2 years ago__always_inline needs the inline keyword as well as the attribute
jsg [Wed, 19 Jan 2022 00:34:31 +0000 (00:34 +0000)]
__always_inline needs the inline keyword as well as the attribute

2 years agoAvoid pulling sys/param.h, by using _ALIGN instead.
deraadt [Tue, 18 Jan 2022 21:59:29 +0000 (21:59 +0000)]
Avoid pulling sys/param.h, by using _ALIGN instead.
sys/time.h now gets NBBY and howmany() also
ok guenther

2 years agosync
deraadt [Tue, 18 Jan 2022 21:00:59 +0000 (21:00 +0000)]
sync

2 years agoPRT_make() can just zap the destination dos_partition if the
krw [Tue, 18 Jan 2022 19:37:27 +0000 (19:37 +0000)]
PRT_make() can just zap the destination dos_partition if the
source prt has prt_ns == 0 or prt_id == DOSPTYP_UNUSED.

No functional change.

2 years agoPass the X509_V_FLAG_CRL_CHECK flag as argument to valid_x509().
claudio [Tue, 18 Jan 2022 18:19:47 +0000 (18:19 +0000)]
Pass the X509_V_FLAG_CRL_CHECK flag as argument to valid_x509().
For mfts this flag is cleared since the CRL is referenced by the MFT itself.
Also remove some if (crl != NULL) checks since they are not needed.
The functions protected by it are all handling NULL as an input.
OK job@ tb@

2 years agoUse X509_get0_pubkey() for opk and remove the EVP_PKEY_free(opk).
claudio [Tue, 18 Jan 2022 16:52:18 +0000 (16:52 +0000)]
Use X509_get0_pubkey() for opk and remove the EVP_PKEY_free(opk).
Suggested by and OK tb@

2 years agoAdjust after change to cert_parse() and ta_parse().
claudio [Tue, 18 Jan 2022 16:41:00 +0000 (16:41 +0000)]
Adjust after change to cert_parse() and ta_parse().

2 years agoChange cert_parse() and ta_parse() to no longer take a x509 handle as
claudio [Tue, 18 Jan 2022 16:36:49 +0000 (16:36 +0000)]
Change cert_parse() and ta_parse() to no longer take a x509 handle as
argument. The x509 cert is also inside struct cert and easy to access.
Also switch auth_insert() to a void function since it can't fail.
OK tb@

2 years agoMore fixing. Previous revert was incomplete.
claudio [Tue, 18 Jan 2022 16:29:06 +0000 (16:29 +0000)]
More fixing. Previous revert was incomplete.

2 years agoRevert all the files that should have not been committed in last commit.
claudio [Tue, 18 Jan 2022 16:24:55 +0000 (16:24 +0000)]
Revert all the files that should have not been committed in last commit.

2 years agoKill extra newline
claudio [Tue, 18 Jan 2022 16:18:22 +0000 (16:18 +0000)]
Kill extra newline

2 years agoFix function name in warn message.
tb [Tue, 18 Jan 2022 16:09:51 +0000 (16:09 +0000)]
Fix function name in warn message.

2 years agoUnify the various X509_verify_cert() calls and the boiler plate code around
claudio [Tue, 18 Jan 2022 13:46:07 +0000 (13:46 +0000)]
Unify the various X509_verify_cert() calls and the boiler plate code around
it into its own function valid_x509(). Simplifies the code substantially.
This may report a few more errors for .roa and .gbr files but IMO that
special case was a left-over from long time ago.
OK tb@

2 years agoCleanup the scattered OBJ_txt2obj() calls and move them into
claudio [Tue, 18 Jan 2022 13:06:43 +0000 (13:06 +0000)]
Cleanup the scattered OBJ_txt2obj() calls and move them into
x509_init_oid() to initalize all necessary OID objects at start.
OK tb@

2 years agoProperly handle read-only clusters in m_pullup(9).
bluhm [Tue, 18 Jan 2022 12:38:21 +0000 (12:38 +0000)]
Properly handle read-only clusters in m_pullup(9).

If the first mbuf of a chain in m_pullup is a cluster, check if the
cluster is read-only (shared or an external buffer).  If so, don't
touch it and create a new mbuf for the pullup data.

This restores original 4.4BSD m_pullup, that not only returned
contiguous mbuf data of the specified length, but also converted
read-only clusters into writeable memory.  The latter feature was
lost during some refactoring.

from ehrhardt@; tested by weerd@; OK stsp@ bluhm@ claudio@

2 years agoImprove how quirks are handled on sdhc(4)-compatible drivers. So far
patrick [Tue, 18 Jan 2022 11:36:21 +0000 (11:36 +0000)]
Improve how quirks are handled on sdhc(4)-compatible drivers.  So far
we have passed a modified version of the contents in the capabilities
register if we wanted to override what sdhc(4) would otherwise read.
Unfortunately there's a second capabilities register that we did not
yet take into consideration, which is why to disable DDR50 support we
created a quirk flag in the softc.  The sdhc(4) ACPI nodes have a way
to mask and set bits in both of the capabilities register, which is a
flexible approach to solving that issue and using that for our sdhc(4)
drivers even improves readability.

ok kettenis@

2 years agoreturn EIO, not ENXIO, when the interface underneath ifq_deq_sleep dies.
dlg [Tue, 18 Jan 2022 10:54:05 +0000 (10:54 +0000)]
return EIO, not ENXIO, when the interface underneath ifq_deq_sleep dies.

this is consistent with other drivers when they report their
underlying device being detached.

2 years agoa comment about bridges shouldnt list switch(4), but can have veb(4).
dlg [Tue, 18 Jan 2022 10:48:33 +0000 (10:48 +0000)]
a comment about bridges shouldnt list switch(4), but can have veb(4).

2 years agoAdd cdsdhc(4), a driver for the Cadence SD/SDIO/eMMC host controller.
visa [Tue, 18 Jan 2022 07:53:39 +0000 (07:53 +0000)]
Add cdsdhc(4), a driver for the Cadence SD/SDIO/eMMC host controller.

Tested on a PolarFire SoC.

2 years agoplic: Fix cpuid handling
visa [Tue, 18 Jan 2022 07:44:37 +0000 (07:44 +0000)]
plic: Fix cpuid handling

Make `cpu' signed so that the possible return value -1 from
plic_get_cpuid() gets handled correctly in the (cpu < 0) condition.
This prevents plic_attach() from updating sc_contexts[] out of bounds.

When plic_get_cpuid() returns -1, ignore the entry and continue
processing. The error is not fatal. It is normal that secondary CPUs
are not found when running a non-MULTIPROCESSOR kernel on
a multiprocessor machine.

OK kettenis@

2 years agowhen decompressing zlib compressed packets, use Z_SYNC_FLUSH instead
djm [Mon, 17 Jan 2022 22:56:04 +0000 (22:56 +0000)]
when decompressing zlib compressed packets, use Z_SYNC_FLUSH instead
of Z_PARTIAL_FLUSH as the latter is not actually specified as a valid
mode for inflate(). There should be no practical change in behaviour
as the compression side ensures a flush that should make all data
available to the receiver in all cases.

repoted by lamm AT ibm.com via bz3372; ok markus

2 years agomake most of the sftp errors more idiomatic, following the general form
djm [Mon, 17 Jan 2022 21:41:04 +0000 (21:41 +0000)]
make most of the sftp errors more idiomatic, following the general form
of "[local/remote] operation path: error message"; ok markus

2 years agowhen transferring multiple files in SFTP mode, create the destination
djm [Mon, 17 Jan 2022 21:39:51 +0000 (21:39 +0000)]
when transferring multiple files in SFTP mode, create the destination
directory if it doesn't already exist to match olde-scp(1) behaviour.
noticed by deraadt@ ok markus@

2 years agoUpdate libexpat to 2.4.3. This fixes CVE-2021-45960, CVE-2021-46143,
bluhm [Mon, 17 Jan 2022 20:50:22 +0000 (20:50 +0000)]
Update libexpat to 2.4.3.  This fixes CVE-2021-45960, CVE-2021-46143,
and CVE-2022-22822 to CVE-2022-22827.  Relevant for OpenBSD are
security fixes #531 #534 #532 #538 #539 and other changes #527 #513
#514 #502 #503.  No library bump necessary.
OK millert@

2 years agoStop supporting a GOT with only one reserved entry in static PIE
guenther [Mon, 17 Jan 2022 19:45:34 +0000 (19:45 +0000)]
Stop supporting a GOT with only one reserved entry in static PIE
and ld.so itself: support for that in dynamic objects was removed
in 2010.

Inline RELOC_GOT() into boot_md.c and clean up the result like
boot.c, snag just the three DT_MIPS_* tags needed, and delete the
error case which is verified at build time.

ok visa@

2 years agodig: fix -Wunused-but-set-variable warnings
naddy [Mon, 17 Jan 2022 18:19:51 +0000 (18:19 +0000)]
dig: fix -Wunused-but-set-variable warnings

with and ok florian@

2 years agorad: fix -Wunused-but-set-variable warning
naddy [Mon, 17 Jan 2022 18:04:35 +0000 (18:04 +0000)]
rad: fix -Wunused-but-set-variable warning

ok florian@

2 years agosfcc: Fix accidental spinning
visa [Mon, 17 Jan 2022 14:17:48 +0000 (14:17 +0000)]
sfcc: Fix accidental spinning

Adjust end condition so that sfcc_cache_wbinv_range() would not spin
when (pa + len) is not cache line aligned.

While here, fix parameter types of sfcc_cache_wbinv_range() as
suggested by kettenis@.

OK kettenis@ (earlier version), miod@

2 years agoCall uvm_pglistfree(9) instead of uvm_pmr_freepageq().
mpi [Mon, 17 Jan 2022 13:55:32 +0000 (13:55 +0000)]
Call uvm_pglistfree(9) instead of uvm_pmr_freepageq().

There is no functionnal change as the former is just a wrapper around the
latter.  However upper layer of UVM do not need to mess with the internals
of the page allocator.

This will also help when a page cache will be introduced to reduce contention
on the global mutex serializing acess to pmemrange's data.

ok kettenis@, kn@, tb@

2 years agochange irq work from interrupt context back to process context like
jsg [Mon, 17 Jan 2022 12:42:30 +0000 (12:42 +0000)]
change irq work from interrupt context back to process context like
our 5.10 drm used (via a task) by changing from timeout_set() to
timeout_set_proc()

irq work is supposed to be in interrupt context but some path used on
inteldrm with gen 9 graphics sleeps.

Reported by Agnosto Dvonik on kaby lake and jcs@ and aja@ on comet lake.
For Agnosto Dvonik this occured when running firefox or mpv, for jcs@
when playing a video in firefox, for aja@ after 5 min of running gnome.
aja@ has run gnome for many hours with this change without problem.

2 years agoDo not try to strdup NULL, from seL4 at disroot dot org in GitHub issue
nicm [Mon, 17 Jan 2022 10:40:03 +0000 (10:40 +0000)]
Do not try to strdup NULL, from seL4 at disroot dot org in GitHub issue
3038.

2 years agofilessystems -> filesystems
jsg [Mon, 17 Jan 2022 04:12:15 +0000 (04:12 +0000)]
filessystems -> filesystems

2 years agounstub dma_fence_chain_find_seqno() for non zero seqno
jsg [Mon, 17 Jan 2022 03:54:03 +0000 (03:54 +0000)]
unstub dma_fence_chain_find_seqno() for non zero seqno

2 years agoAllow more memory ranges in hibernate
mlarkin [Mon, 17 Jan 2022 02:54:28 +0000 (02:54 +0000)]
Allow more memory ranges in hibernate

The previous limit of VM_PHYSSEG_MAX ranges (16) was proving too small for
newer machines. This diff reorganizes the hibernate signature block to allow
for 22 ranges by removing the kernel version comparison and replacing it
with a SHA of several unique kernel features (the version string and several
addresses of functions not inside the same .o).

Reported by claudio@, who also helped fix some issues in the diff. Input
from deraadt@ as well.

Tested by myself and claudio on a variety of machines. Only compile tested on
i386 as I have no more S4-capable i386 hardware anymore.

ok claudio@

2 years agoNothing depends on archdep.h pulling in other #includes anymore,
guenther [Mon, 17 Jan 2022 01:35:36 +0000 (01:35 +0000)]
Nothing depends on archdep.h pulling in other #includes anymore,
so delete the #includes and hide the RELOC_* functions that are
only used by lib/csu behind "#ifdef RCRT0"

these are the ones I tested; kettenis@ was on board with the concept

2 years agoremove "for all AArch64 platforms" from comment
jsg [Sun, 16 Jan 2022 23:05:48 +0000 (23:05 +0000)]
remove "for all AArch64 platforms" from comment
removed from other archs in 2020 before riscv64 was imported

2 years agodrm/i915: Avoid bitwise vs logical OR warning in snb_wm_latency_quirk()
jsg [Sun, 16 Jan 2022 22:43:25 +0000 (22:43 +0000)]
drm/i915: Avoid bitwise vs logical OR warning in snb_wm_latency_quirk()

From Nathan Chancellor
48d56b00c35266b00ec92aaf0db5b71ce1f27702 in linux 5.15.y/5.15.15
2e70570656adfe1c5d9a29940faa348d5f132199 in mainline linux

2 years agoRemove trailing whitespace in a few places. No code change.
mlarkin [Sun, 16 Jan 2022 22:27:46 +0000 (22:27 +0000)]
Remove trailing whitespace in a few places. No code change.

2 years agodhcpd: fix -Wunused-but-set-variable warning
naddy [Sun, 16 Jan 2022 21:20:25 +0000 (21:20 +0000)]
dhcpd: fix -Wunused-but-set-variable warning

ok krw@

2 years agolibfuse: fix -Wunused-but-set-variable warning
naddy [Sun, 16 Jan 2022 20:06:18 +0000 (20:06 +0000)]
libfuse: fix -Wunused-but-set-variable warning

ok tb@

2 years agoisakmpd: fix -Wunused-but-set-variable warnings
naddy [Sun, 16 Jan 2022 14:30:11 +0000 (14:30 +0000)]
isakmpd: fix -Wunused-but-set-variable warnings

ok guenther@

2 years agopfctl: fix -Wunused-but-set-variable warning
naddy [Sun, 16 Jan 2022 14:28:16 +0000 (14:28 +0000)]
pfctl: fix -Wunused-but-set-variable warning

ok dlg@ guenther@

2 years agomodernise pcn_start with m_defrag and the "new" ifq pattern.
dlg [Sun, 16 Jan 2022 11:34:05 +0000 (11:34 +0000)]
modernise pcn_start with m_defrag and the "new" ifq pattern.

aside from getting rid of a use of the ifq_deq_begin/commit/rollback
stuff, it simplifies the code a lot. im also sick of having the
diff in my tree.

2 years agoAvoid memory leak in error path with openssl(1) smime
inoguchi [Sun, 16 Jan 2022 07:12:28 +0000 (07:12 +0000)]
Avoid memory leak in error path with openssl(1) smime

CID 345316

ok tb@

2 years agoAvoid memory leak in error path with openssl(1) cms
inoguchi [Sun, 16 Jan 2022 07:11:49 +0000 (07:11 +0000)]
Avoid memory leak in error path with openssl(1) cms

CID 345314 345320

ok tb@

2 years agoactivate/notify waiting kq kevents from bpf_wakeup directly.
dlg [Sun, 16 Jan 2022 06:27:14 +0000 (06:27 +0000)]
activate/notify waiting kq kevents from bpf_wakeup directly.

this builds on the mpsafe kq/kevent work visa has been doing.

normally kevents are notified by calling selwakeup, but selwakeup
needs the KERNEL_LOCK. because bpf runs from all sorts of contexts
that may or may not have the kernel lock, the call to selwakeup is
deferred to the systq which already has the kernel lock. while this
avoids spinning in bpf for the kernel lock, it still adds latency
between when the buffer is ready for a program and when that program
gets notified about it. now that bpf kevents are mpsafe and bpf_wakeup
is already holding the necessary locks, we can avoid that latency.

bpf_wakeup now checks if there are waiting kevents and notifies
them immediately. if there are no other things to wake up, bpf_wakeup
avoids the task_add (and associated reference counting) to defer
the selwakeup call.

selwakeup can still try to notify waiting kevents, so this uses the
hint passed to knote() to differentiate between the notification
from bpf_wakeup and selwakeup and returns early from the latter.

ok visa@

2 years agoinitialies -> initializes
jsg [Sun, 16 Jan 2022 05:38:58 +0000 (05:38 +0000)]
initialies -> initializes
ok visa@

2 years agospelling
jsg [Sun, 16 Jan 2022 04:43:34 +0000 (04:43 +0000)]
spelling

2 years agoNothing depends on archdep.h pulling in other #includes anymore,
guenther [Sun, 16 Jan 2022 02:17:05 +0000 (02:17 +0000)]
Nothing depends on archdep.h pulling in other #includes anymore,
so delete the #includes and hide the RELOC_* functions that are
only used by lib/csu behind "#ifdef RCRT0"

ok jca@

2 years agoNothing depends on archdep.h pulling in other #includes anymore,
guenther [Sun, 16 Jan 2022 02:16:40 +0000 (02:16 +0000)]
Nothing depends on archdep.h pulling in other #includes anymore,
so delete the #includes and hide the RELOC_* functions that are
only used by lib/csu behind "#ifdef RCRT0"

ok kettenis@

2 years agoNothing depends on archdep.h pulling in other #includes anymore,
guenther [Sun, 16 Jan 2022 02:14:27 +0000 (02:14 +0000)]
Nothing depends on archdep.h pulling in other #includes anymore,
so delete the #includes and hide the RELOC_* functions that are
only used by lib/csu behind "#ifdef RCRT0"

ok aoyama@

2 years agostoeplizt -> stoeplitz
jsg [Sun, 16 Jan 2022 00:15:48 +0000 (00:15 +0000)]
stoeplizt -> stoeplitz

2 years agovmd: Remove a warning about non-32KHz timebases
mlarkin [Sat, 15 Jan 2022 23:39:11 +0000 (23:39 +0000)]
vmd: Remove a warning about non-32KHz timebases

Remove a warning that has outlived its usefulness.

From Brian Conway, thanks.

2 years agospelling
jsg [Sat, 15 Jan 2022 23:38:50 +0000 (23:38 +0000)]
spelling
ok tb@

2 years agoAdd back an accidentally dropped .Pp
tb [Sat, 15 Jan 2022 18:16:02 +0000 (18:16 +0000)]
Add back an accidentally dropped .Pp

2 years agoDon't reset the controller on each transaction. Remove unecessary polling
kettenis [Sat, 15 Jan 2022 11:04:16 +0000 (11:04 +0000)]
Don't reset the controller on each transaction.  Remove unecessary polling
loop and adjust another polling loop.  This makes accessing the cs42l83
audio codec work.  Probably removing the reset is enough to fix this
but the other changes bring us in line with the Linux driver which had
some decent RE done to it recently.

ok patrick@

2 years agoUpdate for HMAC_CTX_{init,cleanup} hand HMAC_cleanup removal
tb [Sat, 15 Jan 2022 09:14:40 +0000 (09:14 +0000)]
Update for HMAC_CTX_{init,cleanup} hand HMAC_cleanup removal

2 years agoStop documenting clone digests.
tb [Sat, 15 Jan 2022 09:08:51 +0000 (09:08 +0000)]
Stop documenting clone digests.

2 years agobring back spelling fix from rev 1.138 lost in rev 1.140
jsg [Sat, 15 Jan 2022 04:10:01 +0000 (04:10 +0000)]
bring back spelling fix from rev 1.138 lost in rev 1.140
pointed out by Brad

2 years agoMinor cleanup and simplification in dsa_pub_encode()
tb [Sat, 15 Jan 2022 04:02:37 +0000 (04:02 +0000)]
Minor cleanup and simplification in dsa_pub_encode()

This function has a weird dance of allocating an ASN1_STRING in an
inner scope and assigning it to a void pointer in an outer scope for
passing it to X509_PUBKEY_set0_param() and ASN1_STRING_free() on error.
This can be simplified and streamlined.

ok inoguchi

2 years agoAdd ct.h and x509_vfy.h
inoguchi [Sat, 15 Jan 2022 02:46:12 +0000 (02:46 +0000)]
Add ct.h and x509_vfy.h

2 years agoAvoid buffer overflow in asn1_parse2
inoguchi [Fri, 14 Jan 2022 23:55:46 +0000 (23:55 +0000)]
Avoid buffer overflow in asn1_parse2

asn1_par.c r1.29 changed to access p[0] directly, and this pointer could be
overrun since ASN1_get_object advances pointer to the first content octet.
In case invalid ASN1 Boolean data, it has length but no content, I thought
this could be happen.
Adding check p with tot (diff below) will avoid this failure.

Reported by oss-fuzz 43633 and 43648(later)

ok tb@

2 years agomark failing tests for macppc
mbuhl [Fri, 14 Jan 2022 19:53:42 +0000 (19:53 +0000)]
mark failing tests for macppc
OK bluhm@

2 years agoIntroduce a validated cache which holds all the files that have
claudio [Fri, 14 Jan 2022 15:00:23 +0000 (15:00 +0000)]
Introduce a validated cache which holds all the files that have
successfully been verified by rpki-client.

With this the rsync and rrdp directories are more of a temporary storage
location. New files are downloaded there and then moved to the valid
directory at the end. In -n mode only the valid directory is looked at with
the exception of the ta directory holding the trust anchors.
A file can now be in two different locations so adjust all the code paths
that open files to check both locations.
One nice side-effect of this is that the RRDP handling in the main process
got simplified. There is no longer the need for temporary RRDP directories.
OK tb@

2 years agoWe don't have 64-bit atomics on powerpc, but we don't really need them.
kettenis [Fri, 14 Jan 2022 15:00:16 +0000 (15:00 +0000)]
We don't have 64-bit atomics on powerpc, but we don't really need them.
So don't provide atomic64_cmpxchg() on powerpc and on other architectures
make its implementation similar to atomic64_xchg().
This makes the tree build again on macppc.

suggested by & ok jsg@

2 years agoEnable openssl pkey -{,pub}check and pkeyparam -check
tb [Fri, 14 Jan 2022 10:17:30 +0000 (10:17 +0000)]
Enable openssl pkey -{,pub}check and pkeyparam -check

2 years agoUndo static linking and other workarounds that are no longer needed
tb [Fri, 14 Jan 2022 09:38:50 +0000 (09:38 +0000)]
Undo static linking and other workarounds that are no longer needed
after the bump

2 years agoConvert wycheproof.go for opaque EVP_AEAD_CTX
tb [Fri, 14 Jan 2022 09:35:18 +0000 (09:35 +0000)]
Convert wycheproof.go for opaque EVP_AEAD_CTX

2 years agoThe cttest can link dynamically now
tb [Fri, 14 Jan 2022 09:33:46 +0000 (09:33 +0000)]
The cttest can link dynamically now

2 years agoSimplify BN_mont test slightly using a new accessor.
tb [Fri, 14 Jan 2022 09:32:27 +0000 (09:32 +0000)]
Simplify BN_mont test slightly using a new accessor.

2 years agoopenssl(1) dgst: fix build after clones removal
tb [Fri, 14 Jan 2022 09:28:07 +0000 (09:28 +0000)]
openssl(1) dgst: fix build after clones removal

ok inoguchi jsing

2 years agoConvert openssl(1) speed for opaque EVP_AEAD_CTX
tb [Fri, 14 Jan 2022 09:27:30 +0000 (09:27 +0000)]
Convert openssl(1) speed for opaque EVP_AEAD_CTX

ok inoguchi jsing

2 years agoConvert openssl(1) rsa.c for opaque RSA
tb [Fri, 14 Jan 2022 09:26:41 +0000 (09:26 +0000)]
Convert openssl(1) rsa.c for opaque RSA

ok inoguchi jsing

2 years agoopenssl(1) genrsa: simplify access to rsa->e
tb [Fri, 14 Jan 2022 09:25:42 +0000 (09:25 +0000)]
openssl(1) genrsa: simplify access to rsa->e

ok inoguchi jsing

2 years agoConvert openssl(1) gendsa.c to opaque DSA
tb [Fri, 14 Jan 2022 09:25:00 +0000 (09:25 +0000)]
Convert openssl(1) gendsa.c to opaque DSA

ok inoguchi jsing

2 years agoConvert openssl(1) dsaparam to opaque dsa
tb [Fri, 14 Jan 2022 09:24:20 +0000 (09:24 +0000)]
Convert openssl(1) dsaparam to opaque dsa

ok inoguchi jsing

2 years agoConvert openssl(1) dsa.c to opaque DSA
tb [Fri, 14 Jan 2022 09:23:42 +0000 (09:23 +0000)]
Convert openssl(1) dsa.c to opaque DSA

ok inoguchi jsing

2 years agoConvert openssl(1) dhparam to opaque DH
tb [Fri, 14 Jan 2022 09:22:50 +0000 (09:22 +0000)]
Convert openssl(1) dhparam to opaque DH

ok inoguchi jsing

2 years agoConvert openssl(1) dh.c to opaque DH
tb [Fri, 14 Jan 2022 09:21:54 +0000 (09:21 +0000)]
Convert openssl(1) dh.c to opaque DH

ok inoguchi jsing

2 years agoFix acme-client build with opaque RSA
tb [Fri, 14 Jan 2022 09:20:18 +0000 (09:20 +0000)]
Fix acme-client build with opaque RSA

2 years agoisakmpd: convert modp to opaque DH
tb [Fri, 14 Jan 2022 09:19:19 +0000 (09:19 +0000)]
isakmpd: convert modp to opaque DH

2 years agosync
tb [Fri, 14 Jan 2022 09:16:52 +0000 (09:16 +0000)]
sync

2 years agobump libcrypto, libssl, libtls majors after struct visibility changes
tb [Fri, 14 Jan 2022 09:15:07 +0000 (09:15 +0000)]
bump libcrypto, libssl, libtls majors after struct visibility changes
and Symbol addition and removal in libcrypto.