1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

legacy,keys: Fix the macro conditions

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2019-12-16 16:54:56 +01:00
committed by Andreas Schneider
parent 9b858f57c5
commit 3642224ee5
2 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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;