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:
@@ -33,7 +33,7 @@
|
|||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#endif
|
#endif
|
||||||
#include "libssh/crypto.h"
|
#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
|
/* If using OpenSSL implementation, define the signature lenght which would be
|
||||||
* defined in libssh/ed25519.h otherwise */
|
* defined in libssh/ed25519.h otherwise */
|
||||||
#define ED25519_SIG_LEN 64
|
#define ED25519_SIG_LEN 64
|
||||||
@@ -80,7 +80,7 @@ struct ssh_key_struct {
|
|||||||
# endif /* HAVE_OPENSSL_EC_H */
|
# endif /* HAVE_OPENSSL_EC_H */
|
||||||
EVP_PKEY *key; /* Saving the OpenSSL context here to save time while converting*/
|
EVP_PKEY *key; /* Saving the OpenSSL context here to save time while converting*/
|
||||||
#endif /* HAVE_LIBGCRYPT */
|
#endif /* HAVE_LIBGCRYPT */
|
||||||
#ifdef HAVE_OPENSSL_ED25519
|
#if defined(HAVE_LIBCRYPTO) && defined(HAVE_OPENSSL_ED25519)
|
||||||
uint8_t *ed25519_pubkey;
|
uint8_t *ed25519_pubkey;
|
||||||
uint8_t *ed25519_privkey;
|
uint8_t *ed25519_privkey;
|
||||||
#else
|
#else
|
||||||
@@ -104,7 +104,7 @@ struct ssh_signature_struct {
|
|||||||
ssh_string rsa_sig;
|
ssh_string rsa_sig;
|
||||||
struct mbedtls_ecdsa_sig ecdsa_sig;
|
struct mbedtls_ecdsa_sig ecdsa_sig;
|
||||||
#endif /* HAVE_LIBGCRYPT */
|
#endif /* HAVE_LIBGCRYPT */
|
||||||
#ifndef HAVE_OPENSSL_ED25519
|
#if !defined(HAVE_LIBCRYPTO) || !defined(HAVE_OPENSSL_ED25519)
|
||||||
ed25519_signature *ed25519_sig;
|
ed25519_signature *ed25519_sig;
|
||||||
#endif
|
#endif
|
||||||
ssh_string raw_sig;
|
ssh_string raw_sig;
|
||||||
|
|||||||
Reference in New Issue
Block a user