From fac6fb99dac7e7a0d14d20a22d26fc4225d24d74 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Sun, 23 Sep 2018 17:41:28 -0500 Subject: [PATCH] Opaquify CONF. This removes the last mention of LHASH in public headers. This can only break people who stack-allocate CONF or access the data field. The latter does not happen (external code never calls lh_CONF_VALUE_* functions). The former could not work as there would be no way to clean it up. Update-Note: CONF is now opaque. Change-Id: Iad3796c4e75874530d7a70fde2f84a390def2d49 Reviewed-on: https://boringssl-review.googlesource.com/32118 Commit-Queue: David Benjamin CQ-Verified: CQ bot account: commit-bot@chromium.org Reviewed-by: Adam Langley --- crypto/conf/conf.c | 5 +++++ include/openssl/conf.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crypto/conf/conf.c b/crypto/conf/conf.c index b1982f82..4c27ddf3 100644 --- a/crypto/conf/conf.c +++ b/crypto/conf/conf.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include "conf_def.h" @@ -69,6 +70,10 @@ #include "../internal.h" +struct conf_st { + LHASH_OF(CONF_VALUE) *data; +}; + // The maximum length we can grow a value to after variable expansion. 64k // should be more than enough for all reasonable uses. #define MAX_CONF_VALUE_LENGTH 65536 diff --git a/include/openssl/conf.h b/include/openssl/conf.h index 07e34eec..7aa76e13 100644 --- a/include/openssl/conf.h +++ b/include/openssl/conf.h @@ -60,7 +60,6 @@ #include #include -#include #if defined(__cplusplus) extern "C" { @@ -85,10 +84,6 @@ struct conf_value_st { char *value; }; -struct conf_st { - LHASH_OF(CONF_VALUE) *data; -}; - DEFINE_STACK_OF(CONF_VALUE)