]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Wrap OpenSSL includes in unit tests in ifdef.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 14 Jan 2022 02:46:35 +0000 (13:46 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 14 Jan 2022 02:47:27 +0000 (13:47 +1100)
Fixes unit test on systems that do not have OpenSSL headers installed.

regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
regress/unittests/sshkey/test_fuzz.c
regress/unittests/sshkey/test_sshkey.c
regress/unittests/sshsig/tests.c

index 5de8707c47c81663c80ec06c7190f7c6f5cff38b..3b4895895ef1c52c3021401ca23ce19f49c0b952 100644 (file)
 #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"
index a583c4a5774e23ed7cc26b9619d01d95835f671d..2fae19dcfe080470b181a8d9218d2b57a42b0324 100644 (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"
 
index 1f5da68b138e5574bce3aa38dbeba8b774f41fc7..982907ce7f0cc4d06b43030fce41007845cab3bc 100644 (file)
 #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"
 
index c44a98079f94d9745d5514cf9238c7f01106f8f5..fdc3baeb7634759b72e23a4af5755976d4f3b1d8 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
+#ifdef WITH_OPENSSL
 #include <openssl/evp.h>
 #include <openssl/crypto.h>
+#endif
 
 #include "ssherr.h"
 #include "authfile.h"