openssl: only include necessary headers

Avoid #include'ing the openssl_dynamic.h headers, which allows a user to
exclude them from their source tree, in case they have odd license
requirements.
This commit is contained in:
Edward Thomson
2024-10-19 14:45:41 +01:00
parent 6ea625cdad
commit 1bc9781dde
3 changed files with 11 additions and 5 deletions

View File

@@ -6,8 +6,6 @@
*/
#include "streams/openssl.h"
#include "streams/openssl_legacy.h"
#include "streams/openssl_dynamic.h"
#ifdef GIT_OPENSSL

View File

@@ -8,8 +8,14 @@
#define INCLUDE_streams_openssl_h__
#include "common.h"
#include "streams/openssl_legacy.h"
#include "streams/openssl_dynamic.h"
#if defined(GIT_OPENSSL_LEGACY)
# include "streams/openssl_legacy.h"
#endif
#if defined(GIT_OPENSSL_DYNAMIC)
# include "streams/openssl_dynamic.h"
#endif
#include "git2/sys/stream.h"

View File

@@ -7,7 +7,9 @@
#ifndef INCLUDE_streams_openssl_legacy_h__
#define INCLUDE_streams_openssl_legacy_h__
#include "streams/openssl_dynamic.h"
#ifdef GIT_OPENSSL_DYNAMIC
# include "streams/openssl_dynamic.h"
#endif
#if defined(GIT_OPENSSL) && !defined(GIT_OPENSSL_DYNAMIC)
# include <openssl/ssl.h>