From 852c2ed260860b6b85c84f9fe96fb4d23d49c9f2 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 19 Dec 2019 17:30:24 -0500 Subject: In OpenSSL builds, declare STACK for datatypes ... ... and only *define* them in the source files that need them. Use DEFINE_OR_DECLARE which is set appropriately for internal builds and not non-deprecated builds. Deprecate stack-of-block Better documentation Move some ASN1 struct typedefs to types.h Update ParseC to handle this. Most of all, ParseC needed to be more consistent. The handlers are "recursive", in so far that they are called again and again until they terminate, which depends entirely on what the "massager" returns. There's a comment at the beginning of ParseC that explains how that works. {Richard Levtte} Reviewed-by: Dmitry Belyavskiy Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/10669) --- crypto/conf/conf_api.c | 2 ++ crypto/conf/conf_def.c | 2 ++ crypto/conf/conf_mod.c | 4 ++++ crypto/conf/conf_ssl.c | 2 ++ 4 files changed, 10 insertions(+) (limited to 'crypto/conf') diff --git a/crypto/conf/conf_api.c b/crypto/conf/conf_api.c index 4c7349a305..827b4032c7 100644 --- a/crypto/conf/conf_api.c +++ b/crypto/conf/conf_api.c @@ -16,6 +16,8 @@ #include #include +DEFINE_STACK_OF(CONF_VALUE) + static void value_free_hash(const CONF_VALUE *a, LHASH_OF(CONF_VALUE) *conf); static void value_free_stack_doall(CONF_VALUE *a); diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 9718b73a18..9dbda10edf 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -27,6 +27,8 @@ # endif #endif +DEFINE_STACK_OF(BIO) + #ifndef S_ISDIR # define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR) #endif diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index 2bbf43b908..504d9b181a 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -18,6 +18,10 @@ #include #include +DEFINE_STACK_OF(CONF_VALUE) +DEFINE_STACK_OF(CONF_MODULE) +DEFINE_STACK_OF(CONF_IMODULE) + #define DSO_mod_init_name "OPENSSL_init" #define DSO_mod_finish_name "OPENSSL_finish" diff --git a/crypto/conf/conf_ssl.c b/crypto/conf/conf_ssl.c index 5855c50c7b..14d5dc1d5b 100644 --- a/crypto/conf/conf_ssl.c +++ b/crypto/conf/conf_ssl.c @@ -14,6 +14,8 @@ #include "internal/sslconf.h" #include "conf_local.h" +DEFINE_STACK_OF(CONF_VALUE) + /* * SSL library configuration module placeholder. We load it here but defer * all decisions about its contents to libssl. -- cgit v1.2.3