openbsd
9 months agodrm/amd/display: Request usb4 bw for mst streams
jsg [Mon, 4 Mar 2024 02:21:40 +0000 (02:21 +0000)]
drm/amd/display: Request usb4 bw for mst streams

From Peichen Huang
622c827544ef300899a757f5b1d61554c2c3abcc in linux-6.6.y/6.6.19
5f3bce13266e6fe2f7a46f94d8bc94d5274e276b in mainline linux

9 months agodrm/amd/display: Add dpia display mode validation logic
jsg [Mon, 4 Mar 2024 02:18:12 +0000 (02:18 +0000)]
drm/amd/display: Add dpia display mode validation logic

From Meenakshikumar Somasundaram
c3682b63c60fdef04fc503d36d08bb84ee9758ad in linux-6.6.y/6.6.19
59f1622a5f05d948a7c665a458a3dd76ba73015e in mainline linux

9 months agoSeparate parsing of string array options from applying them to the
djm [Mon, 4 Mar 2024 02:16:11 +0000 (02:16 +0000)]
Separate parsing of string array options from applying them to the
active configuration. This fixes the config parser from erroneously
rejecting cases like:

AuthenticationMethods password
Match User ivy
  AuthenticationMethods any

bz3657 ok markus@

9 months agodrm/amdgpu: Fix HDP flush for VFs on nbio v7.9
jsg [Mon, 4 Mar 2024 02:13:13 +0000 (02:13 +0000)]
drm/amdgpu: Fix HDP flush for VFs on nbio v7.9

From Lijo Lazar
c19453cc16ad5d90f9ed40686203103e57085580 in linux-6.6.y/6.6.19
534c8a5b9d5d41d30cdcac93cfa1bca5e17be009 in mainline linux

9 months agodrm/amdgpu: Fix shared buff copy to user
jsg [Mon, 4 Mar 2024 02:11:22 +0000 (02:11 +0000)]
drm/amdgpu: Fix shared buff copy to user

From Stanley.Yang
cb4541cabb531ce230489a2930c5eaaa91d779ce in linux-6.6.y/6.6.19
2dcf82a8e8dc930655787797ef8a3692b527c7a9 in mainline linux

9 months agodrm/amdgpu: reset gpu for s3 suspend abort case
jsg [Mon, 4 Mar 2024 02:09:44 +0000 (02:09 +0000)]
drm/amdgpu: reset gpu for s3 suspend abort case

From Prike Liang
61c0a633bdc644b064f0c9fe6412df247b2fbcca in linux-6.6.y/6.6.19
6ef82ac664bb9568ca3956e0d9c9c478e25077ff in mainline linux

9 months agodrm/amdgpu: skip to program GFXDEC registers for suspend abort
jsg [Mon, 4 Mar 2024 02:08:07 +0000 (02:08 +0000)]
drm/amdgpu: skip to program GFXDEC registers for suspend abort

From Prike Liang
7a3a0b0c7f4720cbac79d991ebb3ab1cd2cd065a in linux-6.6.y/6.6.19
93bafa32a6918154aa0caf9f66679a32c2431357 in mainline linux

9 months agodrm/amdkfd: Use correct drm device for cgroup permission check
jsg [Mon, 4 Mar 2024 02:05:20 +0000 (02:05 +0000)]
drm/amdkfd: Use correct drm device for cgroup permission check

From Mukul Joshi
5a1bd2143fd70f35a255c02611731b509d1cebac in linux-6.6.y/6.6.19
4119734e06a7f30e7e8eb666692a58b85dca0269 in mainline linux

9 months agoAdd support for the "NG" clock bindings for sun5i SoCs.
kettenis [Sun, 3 Mar 2024 21:42:41 +0000 (21:42 +0000)]
Add support for the "NG" clock bindings for sun5i SoCs.

ok patrick@

9 months agobetter estimate
deraadt [Sun, 3 Mar 2024 18:24:07 +0000 (18:24 +0000)]
better estimate

9 months agoFlush the D-cache before we disable the cache. This makes more sense and
kettenis [Sun, 3 Mar 2024 17:00:14 +0000 (17:00 +0000)]
Flush the D-cache before we disable the cache.  This makes more sense and
fixes booting on my A10S-OLinuXino-MICRO board.  Since the cache is still
enabled, the CPU might bring back some of the cache lines we just flushed.
So invalidate the cache after disabling.

ok deraadt@

9 months agoClarify which part of the path name is considered for substitution.
millert [Sun, 3 Mar 2024 15:24:45 +0000 (15:24 +0000)]
Clarify which part of the path name is considered for substitution.
Also use "name" instead of "file name" is some places since the
result could be either a file or a directory.  Work done with jmc@

9 months agoReinstate a test that was accidentally removed in previous
tb [Sun, 3 Mar 2024 13:29:19 +0000 (13:29 +0000)]
Reinstate a test that was accidentally removed in previous

9 months agoFill the list of expected test failures for m88k.
miod [Sun, 3 Mar 2024 11:15:38 +0000 (11:15 +0000)]
Fill the list of expected test failures for m88k.

9 months agoCope with the rare case of an imprecise FPU exception caught when
miod [Sun, 3 Mar 2024 11:14:34 +0000 (11:14 +0000)]
Cope with the rare case of an imprecise FPU exception caught when
reenabling the FPU as part of the regular processing of another exception.

9 months agoWorkaround a 88100 errata where a FPU imprecise exception may be raised
miod [Sun, 3 Mar 2024 11:03:13 +0000 (11:03 +0000)]
Workaround a 88100 errata where a FPU imprecise exception may be raised
for floating-point-to-int conversions by mistake (these instructions are
not supposed to raise this exception).

9 months agoFor macppc, add missing CFI for cr2, cr3, cr4
gkoehler [Sun, 3 Mar 2024 03:09:39 +0000 (03:09 +0000)]
For macppc, add missing CFI for cr2, cr3, cr4

clang -S was missing a line like ".cfi_offset cr2, -16" in functions
that spill cr2 (or cr3, cr4) to the stack.  This was breaking a few
C++ exceptions.  This fix adds the missing CFI.

This will fix the C++ exception that was crashing egdb from
ports/devel/gdb when you did "q to quit" in the pager.

ok kettenis@ tobhe@

9 months agoFix awacs(4) audio on some iMac G3 models
gkoehler [Sun, 3 Mar 2024 02:40:10 +0000 (02:40 +0000)]
Fix awacs(4) audio on some iMac G3 models

This code affects iMac G3s with a slot-loading CD drive (from late
1999 to 2001, after the older tray-loading iMac G3s, and before the
iMac G4s).  Detect such iMacs by their model string (PowerMac2,1 or
PowerMac2,2 or PowerMac4,1), and configure their headphones and
internal speakers in a different way.  These iMacs have 3 places to
connect headphones (2 on front, 1 on right side).  They also have no
audio connection to the CD drive, so turn off the noisy CD input.

From evan (dot) jss (at) protonmail (dot) ch; I edited the code to get
the model string.

9 months agosnc
deraadt [Sun, 3 Mar 2024 00:22:23 +0000 (00:22 +0000)]
snc

9 months agoexamples should show how to check the signature of the next release
benno [Sat, 2 Mar 2024 23:38:00 +0000 (23:38 +0000)]
examples should show how to check the signature of the next release

9 months agobump version to 7.5.0
op [Sat, 2 Mar 2024 22:40:28 +0000 (22:40 +0000)]
bump version to 7.5.0

9 months agosync
deraadt [Sat, 2 Mar 2024 22:17:19 +0000 (22:17 +0000)]
sync

9 months agoadd rkpmic(4); ok kettenis
jmc [Sat, 2 Mar 2024 22:08:50 +0000 (22:08 +0000)]
add rkpmic(4); ok kettenis

9 months agoThis driver can now attach to SPI and supports the RK806 PMIC.
kettenis [Sat, 2 Mar 2024 20:22:13 +0000 (20:22 +0000)]
This driver can now attach to SPI and supports the RK806 PMIC.

9 months agorkspi(4)
kettenis [Sat, 2 Mar 2024 20:21:33 +0000 (20:21 +0000)]
rkspi(4)

9 months agoEnable rkspi(4) and rkpmic(4) at spi.
kettenis [Sat, 2 Mar 2024 19:53:17 +0000 (19:53 +0000)]
Enable rkspi(4) and rkpmic(4) at spi.

ok patrick@

9 months agoAdd support for attaching rkpmic(4) to an SPI bus. Add support for
kettenis [Sat, 2 Mar 2024 19:52:41 +0000 (19:52 +0000)]
Add support for attaching rkpmic(4) to an SPI bus.  Add support for
the RK806 PMIC which can attach to both I2C and SPI.  Based on an old
diff from patrick@

ok patrick@

9 months agoAdd rkspi(4), a driver for the SPI controller found on various Rockchip
kettenis [Sat, 2 Mar 2024 19:50:30 +0000 (19:50 +0000)]
Add rkspi(4), a driver for the SPI controller found on various Rockchip
SoCs.  Based on an earlier diff from patrick@

ok patrick@

9 months agoAdd clocks for the RK3588 SPI controller.
kettenis [Sat, 2 Mar 2024 19:48:13 +0000 (19:48 +0000)]
Add clocks for the RK3588 SPI controller.

From patrick@

9 months agoShorter and simpler version which does not need to use the stack.
miod [Sat, 2 Mar 2024 16:51:00 +0000 (16:51 +0000)]
Shorter and simpler version which does not need to use the stack.

9 months agoTrigger retransmission only for fragment 1/x, otherwise each received
tobhe [Sat, 2 Mar 2024 16:16:07 +0000 (16:16 +0000)]
Trigger retransmission only for fragment 1/x, otherwise each received
fragment can trigger retransmission of the full fragment queue.

From RFC7383, 2.6.1:
"[...] that even MUST only trigger a retransmission of the response message
 (fragmented or no) if the Fragment Number field in the received
 fragments is set to 1; otherwise, it MUST be ignored."

from markus

9 months agoBump to OpenIKED 7.4
tobhe [Sat, 2 Mar 2024 15:55:58 +0000 (15:55 +0000)]
Bump to OpenIKED 7.4

9 months agoinclude <time.h> for time_t and struct tm, needed for macos
tb [Sat, 2 Mar 2024 15:40:05 +0000 (15:40 +0000)]
include <time.h> for time_t and struct tm, needed for macos

ok millert miod

9 months agoimplement qwx(4) monitor status ring polling
stsp [Sat, 2 Mar 2024 15:18:57 +0000 (15:18 +0000)]
implement qwx(4) monitor status ring polling

On QCNFA765 the monitor status ring does not trigger any interrupts.
Unless the driver keeps polling this ring from a timer the device
will eventually lock up if this ring is enabled.

Even though we're not using this ring yet, add the tiny bits of code
required to poll it so that the next person who enables this code
won't have to waste time figuring out why the device stops working.

The monitor status ring provides details about received frames in special
TLV-format packets which the driver can parse and update statistics with.
Interesting info includes per-frame RSSI. Which we already learn from
beacons, so we don't need to enable an entire extra ring just for that.

Another reason to keep this disabled is that it triggers mbuf corruption
for reasons I haven't been able to figure out. Help welcome.

9 months agosilently ignore update-stats events from qwx(4) firmware
stsp [Sat, 2 Mar 2024 15:06:20 +0000 (15:06 +0000)]
silently ignore update-stats events from qwx(4) firmware

Reduces noise with QWX_DEBUG enabled.

9 months agorepair QWX_DEBUG build
stsp [Sat, 2 Mar 2024 15:04:27 +0000 (15:04 +0000)]
repair QWX_DEBUG build

9 months agoRemove some GOST relics
tb [Sat, 2 Mar 2024 13:39:28 +0000 (13:39 +0000)]
Remove some GOST relics

9 months agosync (lh_stats.3 removal)
tb [Sat, 2 Mar 2024 13:28:22 +0000 (13:28 +0000)]
sync (lh_stats.3 removal)

9 months agoProvide the missing fabsl alias to fabs.
miod [Sat, 2 Mar 2024 12:02:42 +0000 (12:02 +0000)]
Provide the missing fabsl alias to fabs.

No shlib_version change needed, jumping on the version bump of the mkdtems
addition.

9 months agoUnhook some gost tests
tb [Sat, 2 Mar 2024 11:53:55 +0000 (11:53 +0000)]
Unhook some gost tests

9 months agoCrank libressl version to 3.9.0 (finally!)
tb [Sat, 2 Mar 2024 11:53:30 +0000 (11:53 +0000)]
Crank libressl version to 3.9.0 (finally!)

9 months agosync (libressl major, gost.h removal)
tb [Sat, 2 Mar 2024 11:52:43 +0000 (11:52 +0000)]
sync (libressl major, gost.h removal)

9 months agocrank libtls major
tb [Sat, 2 Mar 2024 11:50:36 +0000 (11:50 +0000)]
crank libtls major

same bump as libcrypto and libssl

9 months agocrank libssl major
tb [Sat, 2 Mar 2024 11:49:22 +0000 (11:49 +0000)]
crank libssl major

same bump as libcrypto; symbol removal and addition

9 months agoRemove SSL_debug
tb [Sat, 2 Mar 2024 11:48:55 +0000 (11:48 +0000)]
Remove SSL_debug

The garbage truck is quite full by now. Collect the last symbol
straggler for this bump.

ok jsing

9 months agoGarbage collect TLS1_FLAGS_SKIP_CERT_VERIFY
tb [Sat, 2 Mar 2024 11:47:41 +0000 (11:47 +0000)]
Garbage collect TLS1_FLAGS_SKIP_CERT_VERIFY

And here goes another weird-ass thing of dubious pedigree.

ok jsing

9 months agoMake {SSL3,TLS}_CT_* internal
tb [Sat, 2 Mar 2024 11:46:55 +0000 (11:46 +0000)]
Make {SSL3,TLS}_CT_* internal

And here goes a bunch of unused macros that just had to be in two
headers so they could get out of sync. Three of these constants
are used in a single function...

ok jsing

9 months agoRemove SSL_CIPHER_get_by_{id,value}()
tb [Sat, 2 Mar 2024 11:45:51 +0000 (11:45 +0000)]
Remove SSL_CIPHER_get_by_{id,value}()

While this undocumented API would have been much nicer and saner than
SSL_CIPHER_find(), nothing used this except for the exporter test.
Let's get rid of it again. libssl uses ssl3_get_cipher_by_{id,value}()
directly.

ok jsing

9 months agoExport SSL_get_{peer_,}signature_type_nid()
tb [Sat, 2 Mar 2024 11:44:47 +0000 (11:44 +0000)]
Export SSL_get_{peer_,}signature_type_nid()

Also move the prototypes to the correct header.

Oversight reported by Frank Lichtenheld, thanks!
Fixes https://github.com/libressl/openbsd/issues/147

ok jsing

9 months agocrank libcrypto major
tb [Sat, 2 Mar 2024 11:41:53 +0000 (11:41 +0000)]
crank libcrypto major

There were symbol addition, removal, function signature changes and
struct visibility changes.

9 months agoChange sk in CRYPTO_EX_DATA from STACK_OF(void) * to void *
tb [Sat, 2 Mar 2024 11:40:53 +0000 (11:40 +0000)]
Change sk in CRYPTO_EX_DATA from STACK_OF(void) * to void *

Requested by jsing

9 months agotedu OPENSSL_isservice() prototype
tb [Sat, 2 Mar 2024 11:39:11 +0000 (11:39 +0000)]
tedu OPENSSL_isservice() prototype

When tedu tedued OPENSSL_isservice(), tedus chainsaw missed crypto.h.
Finish the teduing of the hack for Visual C++ 5.0 (!), which is still
present in the latest and greatest OpenSSL.

ok jsing

9 months agoMake CRYPTO_THREADID opaque
tb [Sat, 2 Mar 2024 11:37:13 +0000 (11:37 +0000)]
Make CRYPTO_THREADID opaque

With ERR_STATE out of the way, we can make CRYPTO_THREADID opaque.
The type is still accessed by used public API, but some of the public
API can also go away.

ok jsing

9 months agoFix CRYPTO_malloc/free signatures
tb [Sat, 2 Mar 2024 11:35:09 +0000 (11:35 +0000)]
Fix CRYPTO_malloc/free signatures

Importantly, the size in malloc is now a size_t instead of an int. The API
now also takes a file and line to match upstream's signature.

ok jsing

9 months agoRemove CRYPTO_*info
tb [Sat, 2 Mar 2024 11:32:31 +0000 (11:32 +0000)]
Remove CRYPTO_*info

Long time neutered, only used (pointlessly without error checking) in the
error code until very recently.

ok jsing

9 months agoRemove a bunch of CRYPTO memory API
tb [Sat, 2 Mar 2024 11:28:46 +0000 (11:28 +0000)]
Remove a bunch of CRYPTO memory API

This was neutered early on in the fork and has been rotting ever since.
Some parts of the API are still used, but it's easier to clean up when
most of the mess is gone.

ok jsing

9 months agoUpdate list of OPENSSL_NO_*
tb [Sat, 2 Mar 2024 11:25:46 +0000 (11:25 +0000)]
Update list of OPENSSL_NO_*

This syncs the list with some version of upstream and exposes a few
OPENSSL_NO_* that may now be relevant.

from jsing (a long time ago)

9 months agoRemove a few no longer used sk_FOO_* stanzas
tb [Sat, 2 Mar 2024 11:22:48 +0000 (11:22 +0000)]
Remove a few no longer used sk_FOO_* stanzas

ok jsing

9 months agoRemove sk_find_ex()
tb [Sat, 2 Mar 2024 11:20:36 +0000 (11:20 +0000)]
Remove sk_find_ex()

This API intends to find the closest match to the needle. M2Crypto
exposes it because it can. This will be fixed by patching the port.

ok jsing

9 months agoUnhook and remove GOST and STREEBOG
tb [Sat, 2 Mar 2024 11:17:27 +0000 (11:17 +0000)]
Unhook and remove GOST and STREEBOG

This stops compiling the GOST source. The current implementation is low
quality and got in the way, especially in libssl. While we would be open
for GOST support, it needs to be significantly better than what we have
had and it also needs a maintainer.

Add OPENSSL_NO_GOST to opensslfeatures and stop installing gost.h.
Some code wrapped in #ifndef OPENSSL_NO_GOST will be removed later.

ok jsing

9 months agoMake LHASH_OF() and STACK_OF() use opaque structs
tb [Sat, 2 Mar 2024 11:11:11 +0000 (11:11 +0000)]
Make LHASH_OF() and STACK_OF() use opaque structs

This removes internals of these two special snowflakes and will allow
further simplifications. Unfortunately, there are some pieces of
software that actually use LHASH_OF() (looking at you, pound, Ruby, and
openssl(1)), so we get to keep exposing this garbage, at least for now.

Expose lh_error() as a symbol to replace a macro reaching into _LHASH.
lh_down_load() is no longer available. _LHASH and _STACK are now opaque,
LHASH_NODE becomes internal-only.

from jsing

9 months agoRemove lh stats
tb [Sat, 2 Mar 2024 11:04:51 +0000 (11:04 +0000)]
Remove lh stats

This could have been removed in an earlier bump. Now it's time for it to
say goodbye.

ok jsing

9 months agoRemove X509_CRL_METHOD API
tb [Sat, 2 Mar 2024 10:59:41 +0000 (10:59 +0000)]
Remove X509_CRL_METHOD API

I would keep repeating myself... In the bit bucket you go.

ok jsing

9 months agoGarbage collect most of the public LOOKUP API
tb [Sat, 2 Mar 2024 10:57:03 +0000 (10:57 +0000)]
Garbage collect most of the public LOOKUP API

Yet another bit of extensibility that no one ever really used.
X509_LOOKUP_free() needs to stay because of ... rust-openssl
(and kdelibs4support).

ok jsing

9 months agoExpose X509_STORE_get1_objects()
tb [Sat, 2 Mar 2024 10:54:39 +0000 (10:54 +0000)]
Expose X509_STORE_get1_objects()

Safer replacement API for the unsafe X509_STORE_get0_objects().

ok jsing

9 months agoMake X509_CERT_AUX internal
tb [Sat, 2 Mar 2024 10:52:24 +0000 (10:52 +0000)]
Make X509_CERT_AUX internal

Another struct/API that should never have leaked out of the library.

ok jsing

9 months agoRemove X509_TRUST from the public API
tb [Sat, 2 Mar 2024 10:50:26 +0000 (10:50 +0000)]
Remove X509_TRUST from the public API

With API and other users internal, this struct can now go.

ok jsing

9 months agoRemove DECLARE_STACK_OF(X509_TRUST)
tb [Sat, 2 Mar 2024 10:49:03 +0000 (10:49 +0000)]
Remove DECLARE_STACK_OF(X509_TRUST)

Unused since the extensibility was neutered.

ok jsing

9 months agoRemove unused public X509_TRUST API
tb [Sat, 2 Mar 2024 10:48:17 +0000 (10:48 +0000)]
Remove unused public X509_TRUST API

Another thing that should never have leaked out of the library. It
will become internal entirely, where the code can be simplified greatly.

ok jsing

9 months agoconst correct X509_PURPOSE_get0{,_{,s}name}()
tb [Sat, 2 Mar 2024 10:43:52 +0000 (10:43 +0000)]
const correct X509_PURPOSE_get0{,_{,s}name}()

Unfortunately, PHP and rust-openssl still need this API. At least we
can make the table read-only now since we disabled its extensibility.

ok jsing

9 months agoMake X509_PURPOSE opaque
tb [Sat, 2 Mar 2024 10:41:46 +0000 (10:41 +0000)]
Make X509_PURPOSE opaque

Code using details of X509_PURPOSE does so by using API. So we can make
this struct opaque.

ok jsing

9 months agoRemove unused parts of the purpose API
tb [Sat, 2 Mar 2024 10:40:05 +0000 (10:40 +0000)]
Remove unused parts of the purpose API

Most of this is the ability to add custom purposes. Also the astounding
X509_STORE_CTX_purpose_inherit(). The names are used by PHP, and M2Crypto
exposes X509_check_purpose(), so these remain public. Some weird, most
likely invalid, uses also remain in rust-openssl.

ok jsing

9 months agoRemove X509V3_EXT extensibility API
tb [Sat, 2 Mar 2024 10:35:32 +0000 (10:35 +0000)]
Remove X509V3_EXT extensibility API

You used to be able to define your own X.509 extension handlers. Great.
Even greater: the verifier would ignore any custom extensions. So this
was only ever useful for serialization and deserialization. In other
words, almost entirely pointless. The API was also unused except for
a hack in kore-acme, which was fixed recently.

ok jsing

9 months agoRemove X509_ALGOR_set_md()
tb [Sat, 2 Mar 2024 10:33:51 +0000 (10:33 +0000)]
Remove X509_ALGOR_set_md()

One of those void APIs that are super hard to use safely since they can
fail but can't communicate failure. Nothing uses this. Internal uses have
been converted to error checked X509_ALGOR_set_evp_md().

ok jsing

9 months agoAdjust signature of ERR_load_strings()
tb [Sat, 2 Mar 2024 10:32:26 +0000 (10:32 +0000)]
Adjust signature of ERR_load_strings()

This aligns the prototypes with OpenSSL 1.1.

ok jsing

9 months agoRemove ERR_get_state
tb [Sat, 2 Mar 2024 10:30:48 +0000 (10:30 +0000)]
Remove ERR_get_state

The ERR_STATE struct is an unused implementation detail of the horrific
error stack code. It is the last public consumer of CRYPTO_THREAD
internals. Make this and its accessor internal so we can make the
CRYPTO_THREAD struct opaque.

ok jsing

9 months agoSimplify engine.h
tb [Sat, 2 Mar 2024 10:22:07 +0000 (10:22 +0000)]
Simplify engine.h

Garbage collect some more of this former horror show.

ok jsing

9 months agoGarbage collect CUSTOM_KEY_LENGTH/SET_KEY_LENGTH
tb [Sat, 2 Mar 2024 10:21:12 +0000 (10:21 +0000)]
Garbage collect CUSTOM_KEY_LENGTH/SET_KEY_LENGTH

These are unused defines that used to add unwanted complications in
EVP_CIPHER_CTX_set_key_lenght().

ok jsing

9 months agoRemove more PBE stuff from the public API
tb [Sat, 2 Mar 2024 10:20:27 +0000 (10:20 +0000)]
Remove more PBE stuff from the public API

This is still needed internally for CMS and its predecessors. This
removal will enable disentangling some of its innards.

ok jsing

9 months agoRemove most PBEPARAM stuff from public visibility
tb [Sat, 2 Mar 2024 10:17:37 +0000 (10:17 +0000)]
Remove most PBEPARAM stuff from public visibility

The struct itself needs to remain public, unfortunately.

ok jsing

9 months agoRemove a lot of PKCS12 garbage from the public API
tb [Sat, 2 Mar 2024 10:15:15 +0000 (10:15 +0000)]
Remove a lot of PKCS12 garbage from the public API

PKCS12 is a hot mess. Please participate in the survey at the end of
https://www.cs.auckland.ac.nz/~pgut001/pubs/pfx.html to increase its
credibility and unanimity.

ok jsing

9 months agolist install.img in contents where it is built
jsg [Sat, 2 Mar 2024 10:14:31 +0000 (10:14 +0000)]
list install.img in contents where it is built
landry@ noted it wasn't in arm64 contents

9 months agoRemove RC4-HMAC-MD5 and AES-{128,256}-CBC-HMAC-SHA-1
tb [Sat, 2 Mar 2024 10:13:12 +0000 (10:13 +0000)]
Remove RC4-HMAC-MD5 and AES-{128,256}-CBC-HMAC-SHA-1

"Stitched" mode AEADs were removed from libssl a long time ago. Nothing
uses these CIPHERs anymore.

ok jsing

9 months agoMake legacy cipher methods internal
tb [Sat, 2 Mar 2024 10:08:29 +0000 (10:08 +0000)]
Make legacy cipher methods internal

These are ASN.1 handlers for CIPHERs, still used by CMS and its
predecessors. They should never have been public.

ok jsing

9 months agoRemove EVP_PBE_* API from public visibility
tb [Sat, 2 Mar 2024 10:06:48 +0000 (10:06 +0000)]
Remove EVP_PBE_* API from public visibility

You can no longer add your custom PBE algorithm. Pity. EVP_PBE_CipherInit()
stays for internal use, the rest goes away copmletely.

ok jsing

9 months agoRemove EVP_PKEY_meth_*() API
tb [Sat, 2 Mar 2024 10:04:40 +0000 (10:04 +0000)]
Remove EVP_PKEY_meth_*() API

After ameth, the second bit of custom EVP_PKEY API removal.

ok jsing

9 months agoRemove the ameth lib
tb [Sat, 2 Mar 2024 10:03:12 +0000 (10:03 +0000)]
Remove the ameth lib

This is accessor API for ASN.1 methods needed for custom PKEYs.
Nothing has ever used this. This has been neutered for months.
The EVP_PKEY_asn1_* API that needs to stay was moved elsewhere.

ok jsing

9 months agoRemove EVP_MD_meth* again
tb [Sat, 2 Mar 2024 09:59:56 +0000 (09:59 +0000)]
Remove EVP_MD_meth* again

Erlang upstream disabled the otp_test_engine for LibreSSL >= 3.5 without
explanation. It was the only reason we added this garbage API in the first
place. Meanwhile libfido2 started using it for a mock up of OpenSSL 3's
broken fetch design with old API. This is pointless, so all this garbage
goes away again (in particular we can remove the absolutely horrifying
EVP_MD_meth_set_app_datasize() again).

ok jsing

9 months agoFix signature and semantics of EVP_{CIPHER,MD}_CTX_init()
tb [Sat, 2 Mar 2024 09:55:30 +0000 (09:55 +0000)]
Fix signature and semantics of EVP_{CIPHER,MD}_CTX_init()

When the EVP_CIPHER_CTX and the EVP_MD_CTX were still expected to live
on the stack, these initialization APIs were wrappers around memset.
In OpenSSL 1.1, somebody removed them and carelessly made _init() an
alias of _reset() aka _cleanup(). As a consequence, both signature and
semantics changed.

Unsurprisingly, there is now code out there that actually uses the new
semantics, which causes leaks on LibreSSL and older OpenSSL. This aligns
our _init() with OpenSSL 1.1 semantics.

ok jsing

9 months agoRemove unused OBJ_create_and_add_object()
tb [Sat, 2 Mar 2024 09:51:36 +0000 (09:51 +0000)]
Remove unused OBJ_create_and_add_object()

This is an alias for OBJ_create(). I haven't dug into its history.

ok jsing

9 months agoRemove no longer supported OBJ_NAME_TYPEs
tb [Sat, 2 Mar 2024 09:50:47 +0000 (09:50 +0000)]
Remove no longer supported OBJ_NAME_TYPEs

OBJ_NAME_TYPE_PKEY_METH and OBJ_NAME_TYPE_COMP_METH were never used
as far as I can tell. Unfortunately, PHP and Python still use the
weirdly named OBJ_NAME_do_all*() API to list available ciphers and
digests, so the MD and CIPHER variants need to remain public.

ok jsing

9 months agoMake OBJ_add_object() static
tb [Sat, 2 Mar 2024 09:49:45 +0000 (09:49 +0000)]
Make OBJ_add_object() static

This is another implementation detail that should never have leaked out
of the library. Only OBJ_create() ever used this.

ok jsing

9 months agoRemove OBJ_bsearch_()
tb [Sat, 2 Mar 2024 09:47:16 +0000 (09:47 +0000)]
Remove OBJ_bsearch_()

The only reason this has still been part of the public API was that libssl
used it for cipher lookup. This was fixed by replacing the lookup by proper
bsearch() -- why OpenSSL felt the need to reinvent ANSI C API badly will
forever remain a mystery.

The stack code in libcrypto still uses a version of this. This should
be rewritten. It will be a bit easier once sk_find_ex() is removed.

ok jsing

9 months agoSwitch name member of OBJ_NAME to const void *
tb [Sat, 2 Mar 2024 09:43:10 +0000 (09:43 +0000)]
Switch name member of OBJ_NAME to const void *

Because this is the type it should have had from the get go.

ok jsing

9 months agoRemove unused public OBJ_NAME_* API
tb [Sat, 2 Mar 2024 09:41:02 +0000 (09:41 +0000)]
Remove unused public OBJ_NAME_* API

This functionality has been disabled for a few months. Now it is high time
to garbage collect it.

ok jsing

9 months agoRemove EVP_{add,delete}_{cipher,digest}_alias()
tb [Sat, 2 Mar 2024 09:39:02 +0000 (09:39 +0000)]
Remove EVP_{add,delete}_{cipher,digest}_alias()

These are macro wrappers around the neutered OBJ_NAME_{add,remove}() API
(notice the consistency), which will be removed shortly. Only security/xca
used to use this.

ok jsing

9 months agoRemove EVP_add_{cipher,digest}() from public API
tb [Sat, 2 Mar 2024 09:36:40 +0000 (09:36 +0000)]
Remove EVP_add_{cipher,digest}() from public API

Ciphers and digests are now handled in a static lookup table and no
longer by the associative array that used to underlie the OBJ_NAME API.
Adding ciphers is no longer possible. What uses this API does so for
historic reasons coming from a time where SHA-2 and some AES variants
needed to be enabled explicitly. Ports doing this (PHP and DANE code)
were fixed.

ok jsing

9 months agoRemove DSA_generate_parameters
tb [Sat, 2 Mar 2024 09:33:14 +0000 (09:33 +0000)]
Remove DSA_generate_parameters

This was deprecated in 0.9.8 and used until recently by rust-openssl
and by keynote (keynote has the excuse that it was written before the
deprecation). Fortunately Paul Kehrer fixed this in rust-openssl,
so we can garbage collect this turd. (It was replaced with the less
ergonomic DSA_generate_parameters_ex() to expose a new fancy way of
displaying dots, stars and pluses on key generation).

ok jsing

9 months agoRemove CMAC_resume()
tb [Sat, 2 Mar 2024 09:30:21 +0000 (09:30 +0000)]
Remove CMAC_resume()

While it is a neat design detail of CMAC that you can resume it after
having finalized it, nothing uses this functionality and it adds some
gross things such as retaining intermediate secrets in the CMAC ctx.
Once this is gone, we can simplify the CMAC code a bit.

ok jsing

9 months agoMake BN_mod_exp2_mont() and BN_mod_exp_mont_word() internal
tb [Sat, 2 Mar 2024 09:27:31 +0000 (09:27 +0000)]
Make BN_mod_exp2_mont() and BN_mod_exp_mont_word() internal

The former could be useful but nothing uses it. The latter is a
dangerous implementation detail of Montgomery exponentiation that
should never have been leaked out of the library. Fix this.

ok jsing