From 6a25f07777337637bfa54ff18bb9705db4461bf8 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 8 Jul 2022 09:05:35 +0200 Subject: [PATCH] pki: Fix building pki_ed25519.c with libgcrypt Signed-off-by: Andreas Schneider Reviewed-by: Jakub Jelen --- include/libssh/pki.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libssh/pki.h b/include/libssh/pki.h index 78cd9d0b..cd234e20 100644 --- a/include/libssh/pki.h +++ b/include/libssh/pki.h @@ -33,7 +33,7 @@ #include #endif #include "libssh/crypto.h" -#ifdef HAVE_OPENSSL_ED25519 +#if defined(HAVE_LIBCRYPTO) && defined(HAVE_OPENSSL_ED25519) /* If using OpenSSL implementation, define the signature lenght which would be * defined in libssh/ed25519.h otherwise */ #define ED25519_SIG_LEN 64 @@ -80,7 +80,7 @@ struct ssh_key_struct { # endif /* HAVE_OPENSSL_EC_H */ EVP_PKEY *key; /* Saving the OpenSSL context here to save time while converting*/ #endif /* HAVE_LIBGCRYPT */ -#ifdef HAVE_OPENSSL_ED25519 +#if defined(HAVE_LIBCRYPTO) && defined(HAVE_OPENSSL_ED25519) uint8_t *ed25519_pubkey; uint8_t *ed25519_privkey; #else @@ -104,7 +104,7 @@ struct ssh_signature_struct { ssh_string rsa_sig; struct mbedtls_ecdsa_sig ecdsa_sig; #endif /* HAVE_LIBGCRYPT */ -#ifndef HAVE_OPENSSL_ED25519 +#if !defined(HAVE_LIBCRYPTO) || !defined(HAVE_OPENSSL_ED25519) ed25519_signature *ed25519_sig; #endif ssh_string raw_sig;