Make LHASH_OF() and STACK_OF() use opaque structs
authortb <tb@openbsd.org>
Sat, 2 Mar 2024 11:11:11 +0000 (11:11 +0000)
committertb <tb@openbsd.org>
Sat, 2 Mar 2024 11:11:11 +0000 (11:11 +0000)
commitb935192755f6e71d9197bc075e155749384ce501
tree42e1b3217680f37155ef5a036ea8c2a8cd30826c
parenta4b4d461dffde3f737495df66f54ea5eeb72eb0c
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
13 files changed:
lib/libcrypto/Makefile
lib/libcrypto/Symbols.list
lib/libcrypto/conf/conf_api.c
lib/libcrypto/hidden/openssl/lhash.h
lib/libcrypto/lhash/lhash.c
lib/libcrypto/lhash/lhash.h
lib/libcrypto/lhash/lhash_local.h [new file with mode: 0644]
lib/libcrypto/objects/obj_dat.c
lib/libcrypto/stack/safestack.h
lib/libcrypto/stack/stack.c
lib/libcrypto/stack/stack.h
lib/libcrypto/stack/stack_local.h [new file with mode: 0644]
lib/libcrypto/x509/x509_policy.c