Wrap OpenSSL includes in unit tests in ifdef.

Fixes unit test on systems that do not have OpenSSL headers installed.
This commit is contained in:
Darren Tucker 2022-01-14 13:46:35 +11:00
parent c171879374
commit 976b9588b4
4 changed files with 8 additions and 0 deletions

View File

@ -15,11 +15,13 @@
#include <stdlib.h>
#include <string.h>
#ifdef WITH_OPENSSL
#include <openssl/bn.h>
#include <openssl/objects.h>
#ifdef OPENSSL_HAS_NISTP256
# include <openssl/ec.h>
#endif
#endif
#include "../test_helper/test_helper.h"
#include "ssherr.h"

View File

@ -18,6 +18,7 @@
#include <string.h>
#include <unistd.h>
#ifdef WITH_OPENSSL
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/dsa.h>
@ -25,6 +26,7 @@
#ifdef OPENSSL_HAS_NISTP256
# include <openssl/ec.h>
#endif
#endif
#include "../test_helper/test_helper.h"

View File

@ -15,12 +15,14 @@
#include <stdlib.h>
#include <string.h>
#ifdef WITH_OPENSSL
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/dsa.h>
#if defined(OPENSSL_HAS_ECC) && defined(OPENSSL_HAS_NISTP256)
# include <openssl/ec.h>
#endif
#endif
#include "../test_helper/test_helper.h"

View File

@ -18,8 +18,10 @@
#include <string.h>
#include <unistd.h>
#ifdef WITH_OPENSSL
#include <openssl/evp.h>
#include <openssl/crypto.h>
#endif
#include "ssherr.h"
#include "authfile.h"