Deprecate quite a few recursive includes from the ssl.h API header and remove some unnecessary includes from the internal header ssl_locl.h. This then requires adding includes for bn.h in four C files.
diff --git a/ssl/ssl.h b/ssl/ssl.h index 8a16d77..04909c8 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h
@@ -178,9 +178,16 @@ #ifndef OPENSSL_NO_BIO #include <openssl/bio.h> #endif +#ifndef OPENSSL_NO_DEPRECATED #ifndef OPENSSL_NO_X509 #include <openssl/x509.h> #endif +#include <openssl/crypto.h> +#include <openssl/lhash.h> +#include <openssl/buffer.h> +#endif +#include <openssl/pem.h> + #include <openssl/kssl.h> #include <openssl/safestack.h> #include <openssl/symhacks.h> @@ -318,11 +325,6 @@ } #endif -#include <openssl/crypto.h> -#include <openssl/lhash.h> -#include <openssl/buffer.h> -#include <openssl/pem.h> - #ifdef __cplusplus extern "C" { #endif