1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

pki: Fix building pki_ed25519.c with libgcrypt

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Andreas Schneider
2022-07-08 09:05:35 +02:00
parent cc0939df73
commit 6a25f07777

View File

@@ -33,7 +33,7 @@
#include <openssl/evp.h>
#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;