legacy,keys: Fix the macro conditions
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
9b858f57c5
Коммит
3642224ee5
@ -28,13 +28,13 @@
|
|||||||
struct ssh_public_key_struct {
|
struct ssh_public_key_struct {
|
||||||
int type;
|
int type;
|
||||||
const char *type_c; /* Don't free it ! it is static */
|
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 dsa_pub;
|
||||||
gcry_sexp_t rsa_pub;
|
gcry_sexp_t rsa_pub;
|
||||||
#elif HAVE_LIBCRYPTO
|
#elif defined(HAVE_LIBCRYPTO)
|
||||||
DSA *dsa_pub;
|
DSA *dsa_pub;
|
||||||
RSA *rsa_pub;
|
RSA *rsa_pub;
|
||||||
#elif HAVE_LIBMBEDCRYPTO
|
#elif defined(HAVE_LIBMBEDCRYPTO)
|
||||||
mbedtls_pk_context *rsa_pub;
|
mbedtls_pk_context *rsa_pub;
|
||||||
void *dsa_pub;
|
void *dsa_pub;
|
||||||
#endif
|
#endif
|
||||||
@ -42,13 +42,13 @@ struct ssh_public_key_struct {
|
|||||||
|
|
||||||
struct ssh_private_key_struct {
|
struct ssh_private_key_struct {
|
||||||
int type;
|
int type;
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#if defined(HAVE_LIBGCRYPT)
|
||||||
gcry_sexp_t dsa_priv;
|
gcry_sexp_t dsa_priv;
|
||||||
gcry_sexp_t rsa_priv;
|
gcry_sexp_t rsa_priv;
|
||||||
#elif defined HAVE_LIBCRYPTO
|
#elif defined(HAVE_LIBCRYPTO)
|
||||||
DSA *dsa_priv;
|
DSA *dsa_priv;
|
||||||
RSA *rsa_priv;
|
RSA *rsa_priv;
|
||||||
#elif HAVE_LIBMBEDCRYPTO
|
#elif defined(HAVE_LIBMBEDCRYPTO)
|
||||||
mbedtls_pk_context *rsa_priv;
|
mbedtls_pk_context *rsa_priv;
|
||||||
void *dsa_priv;
|
void *dsa_priv;
|
||||||
#endif
|
#endif
|
||||||
|
@ -353,7 +353,7 @@ void publickey_free(ssh_public_key key) {
|
|||||||
case SSH_KEYTYPE_DSS:
|
case SSH_KEYTYPE_DSS:
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
gcry_sexp_release(key->dsa_pub);
|
gcry_sexp_release(key->dsa_pub);
|
||||||
#elif HAVE_LIBCRYPTO
|
#elif defined HAVE_LIBCRYPTO
|
||||||
DSA_free(key->dsa_pub);
|
DSA_free(key->dsa_pub);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user