]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
make sk-dummy.so work without libcrypto installed
authorDamien Miller <djm@mindrot.org>
Fri, 1 Oct 2021 12:40:06 +0000 (22:40 +1000)
committerDamien Miller <djm@mindrot.org>
Fri, 1 Oct 2021 12:40:06 +0000 (22:40 +1000)
regress/misc/sk-dummy/sk-dummy.c

index 4003362d79607e6c4b7292a6d451a1ea86d1e531..c107aebe73641f1da9c67ec56a28e79ed9d5f2a6 100644 (file)
 #include "crypto_api.h"
 #include "sk-api.h"
 
+#if defined(WITH_OPENSSL) && !defined(WITH_OPENSSL)
+# undef WITH_OPENSSL
+#endif
+
+#ifdef WITH_OPENSSL
 #include <openssl/opensslv.h>
 #include <openssl/crypto.h>
 #include <openssl/evp.h>
@@ -36,8 +41,6 @@
 #include <openssl/ecdsa.h>
 #include <openssl/pem.h>
 
-/* #define SK_DEBUG 1 */
-
 /* Compatibility with OpenSSH 1.0.x */
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
 #define ECDSA_SIG_get0(sig, pr, ps) \
@@ -46,6 +49,9 @@
                (*ps) = sig->s; \
        } while (0)
 #endif
+#endif /* WITH_OPENSSL */
+
+/* #define SK_DEBUG 1 */
 
 #if SSH_SK_VERSION_MAJOR != 0x00070000
 # error SK API has changed, sk-dummy.c needs an update