diff --git a/include/libssh/keys.h b/include/libssh/keys.h index f25283ae..7b138612 100644 --- a/include/libssh/keys.h +++ b/include/libssh/keys.h @@ -28,13 +28,13 @@ struct ssh_public_key_struct { int type; const char *type_c; /* Don't free it ! it is static */ -#ifdef HAVE_LIBGCRYPT +#if defined(HAVE_LIBGCRYPT) gcry_sexp_t dsa_pub; gcry_sexp_t rsa_pub; -#elif HAVE_LIBCRYPTO +#elif defined(HAVE_LIBCRYPTO) DSA *dsa_pub; RSA *rsa_pub; -#elif HAVE_LIBMBEDCRYPTO +#elif defined(HAVE_LIBMBEDCRYPTO) mbedtls_pk_context *rsa_pub; void *dsa_pub; #endif @@ -42,13 +42,13 @@ struct ssh_public_key_struct { struct ssh_private_key_struct { int type; -#ifdef HAVE_LIBGCRYPT +#if defined(HAVE_LIBGCRYPT) gcry_sexp_t dsa_priv; gcry_sexp_t rsa_priv; -#elif defined HAVE_LIBCRYPTO +#elif defined(HAVE_LIBCRYPTO) DSA *dsa_priv; RSA *rsa_priv; -#elif HAVE_LIBMBEDCRYPTO +#elif defined(HAVE_LIBMBEDCRYPTO) mbedtls_pk_context *rsa_priv; void *dsa_priv; #endif diff --git a/src/legacy.c b/src/legacy.c index b92ee662..8ae3d920 100644 --- a/src/legacy.c +++ b/src/legacy.c @@ -353,7 +353,7 @@ void publickey_free(ssh_public_key key) { case SSH_KEYTYPE_DSS: #ifdef HAVE_LIBGCRYPT gcry_sexp_release(key->dsa_pub); -#elif HAVE_LIBCRYPTO +#elif defined HAVE_LIBCRYPTO DSA_free(key->dsa_pub); #endif break;