openbsd
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

9 months agoMake BN_mod_exp_simple() internal
tb [Sat, 2 Mar 2024 09:24:59 +0000 (09:24 +0000)]
Make BN_mod_exp_simple() internal

This function is very slow and useful for testing purposes only. It
should never have been part of the public API. Remove it from there.

ok jsing

9 months agoRemove BIO_set()
tb [Sat, 2 Mar 2024 09:22:41 +0000 (09:22 +0000)]
Remove BIO_set()

This used to be a dangerous implementation detail of BIO_new() that was
never used outside of libcrypto.

ok jsing

9 months agoRemove BIO_dump_*{cb,fp}()
tb [Sat, 2 Mar 2024 09:21:24 +0000 (09:21 +0000)]
Remove BIO_dump_*{cb,fp}()

These were disabled and the internals that need to remain were fixed.
Time for this garbage to go.

ok jsing

9 months agoRemove BIO_{sn,v,vsn}printf(3)
tb [Sat, 2 Mar 2024 09:18:28 +0000 (09:18 +0000)]
Remove BIO_{sn,v,vsn}printf(3)

Unsued printing functionality. If something should need this we can readily
add it back.

ok jsing

9 months agoExpose OPENSSL_{gmtime,posix_to_tm,timegm,tm_to_posix}()
tb [Sat, 2 Mar 2024 09:15:03 +0000 (09:15 +0000)]
Expose OPENSSL_{gmtime,posix_to_tm,timegm,tm_to_posix}()

Apart from OPENSSL_gmtime(), which is OpenSSL API, this is BoringSSL's
interface to deal with the time related portability and code mess.

ok jsing

9 months agoGarbage collect ASN1_TIME_set_tm()
tb [Sat, 2 Mar 2024 09:10:42 +0000 (09:10 +0000)]
Garbage collect ASN1_TIME_set_tm()

This was a public helper that is no longer used internally either.

ok jsing

9 months agoRemove beck's ASN.1 time API from public visibility
tb [Sat, 2 Mar 2024 09:08:41 +0000 (09:08 +0000)]
Remove beck's ASN.1 time API from public visibility

This API was needed since OpenSSL didn't have one. We now have variants
of OpenSSL's API and will also expose BoringSSL's complementary API. The
users of this API were ported to the OpenSSL variants and some may switch
to BoringSSL's in the future. Part of it is still used internally.

ASN1_time_tm_clamp_notafter() is still used by libtls (and only libtls).
This will be fixed in a future bump.

ok jsing

9 months agoRemove ASN1_PCTX nonsense
tb [Sat, 2 Mar 2024 09:04:07 +0000 (09:04 +0000)]
Remove ASN1_PCTX nonsense

This is only used by the fuzzing code. Another bit of poorly thought
out extensibility that makes people pass NULL pointers to a bunch
of APIs.

ok jsing

9 months agoMake ASN1_add_oid_module internal
tb [Sat, 2 Mar 2024 09:02:04 +0000 (09:02 +0000)]
Make ASN1_add_oid_module internal

ok jsing

9 months agoRemove unused M_ASN1_* macros
tb [Sat, 2 Mar 2024 09:00:07 +0000 (09:00 +0000)]
Remove unused M_ASN1_* macros

The last comsumer, telephony/asterisk, was adjusted a few months back.

pointed out by brad
ok jsing

9 months agoRemove unused, incomplete ub_* macros
tb [Sat, 2 Mar 2024 08:57:42 +0000 (08:57 +0000)]
Remove unused, incomplete ub_* macros

The only consumer, a_strnid.c, has its own, slightly more complete, up
to date, and less incorrect, version of these.

ok jsing

9 months agoRemove DECLARE_STACK_OF(ASN1_STRING_TABLE)
tb [Sat, 2 Mar 2024 08:55:38 +0000 (08:55 +0000)]
Remove DECLARE_STACK_OF(ASN1_STRING_TABLE)

Another remnant of the unused ASN1_STRING_TABLE extensibility goes away.

ok jsing

9 months agoRemove ASN1_STRING_TABLE_{add,cleanup}
tb [Sat, 2 Mar 2024 08:54:02 +0000 (08:54 +0000)]
Remove ASN1_STRING_TABLE_{add,cleanup}

This was API for the ASN1_STRING_TABLE extensibility which has been
neutered for months and was completely unused in the ecosystem.

ok jsing

9 months agoconst correct ASN1_STRING_TABLE_get()
tb [Sat, 2 Mar 2024 08:50:47 +0000 (08:50 +0000)]
const correct ASN1_STRING_TABLE_get()

The ability of modifying the ASN1_STRING_TABLE was removed and the table
is now static. Stop casting away const. The only consumer, security/xca,
is already fixed.

ok jsing

9 months agosync
deraadt [Sat, 2 Mar 2024 01:07:23 +0000 (01:07 +0000)]
sync

9 months agoClarify behavior when there is more than one run of Xs.
millert [Fri, 1 Mar 2024 23:37:42 +0000 (23:37 +0000)]
Clarify behavior when there is more than one run of Xs.
With help from miod@

9 months agomktemp(1): add suffix support for compatibility with the GNU version
millert [Fri, 1 Mar 2024 21:50:40 +0000 (21:50 +0000)]
mktemp(1): add suffix support for compatibility with the GNU version
It is now possible to use templates where the Xs are not at the
end, like "foo.XXXXXX.bar".  If there are multiple runs of Xs,
the last one is used.  OK deraadt@

9 months agoAdd mkdtemps(3), like mkdtemp(3) but with a suffix.
millert [Fri, 1 Mar 2024 21:30:40 +0000 (21:30 +0000)]
Add mkdtemps(3), like mkdtemp(3) but with a suffix.
OK deraadt@ tb@

9 months agoAllow fdisk(8) to add GPT partitions of protected types.
krw [Fri, 1 Mar 2024 17:48:03 +0000 (17:48 +0000)]
Allow fdisk(8) to add GPT partitions of protected types.

This makes it possible to provision virtual machine images that
need a "BIOS Boot" partition.

Report, original diff and testing by Christian Ludwig. Thanks!

ok miod@

9 months agoBump version
tb [Fri, 1 Mar 2024 16:27:34 +0000 (16:27 +0000)]
Bump version

9 months agoBump version
claudio [Fri, 1 Mar 2024 16:23:37 +0000 (16:23 +0000)]
Bump version

9 months agoReduce dmesg spam by only printing the CPU feature flags when they differ
kettenis [Fri, 1 Mar 2024 15:57:43 +0000 (15:57 +0000)]
Reduce dmesg spam by only printing the CPU feature flags when they differ
from the previous one.  Since CPU cores are typically grouped in clusters
of identical cores and are typically enumerated this results in flags
being printed for the first core of a cluster.  But only if the clusters
use cores that implement different features which is rare.

ok deraadt@

9 months agoProtect pool_get() with kernel lock in sys_ypconnect().
bluhm [Fri, 1 Mar 2024 14:15:01 +0000 (14:15 +0000)]
Protect pool_get() with kernel lock in sys_ypconnect().

Pool namei_pool is initialized with IPL_NONE as filesystem always
runs with kernel lock.  So pool_get() needs kernel lock also in
sys_ypconnect().

OK kn@ deraadt@

9 months agoLipstick on a pig: avoid comparing signed and unsigned
job [Fri, 1 Mar 2024 09:36:55 +0000 (09:36 +0000)]
Lipstick on a pig: avoid comparing signed and unsigned

OK tb@ claudio@