more OPENSSL_HAS_ECC

This commit is contained in:
Damien Miller 2024-08-16 08:30:20 +10:00
parent 4da2a1a7f6
commit a13856374b
No known key found for this signature in database
1 changed files with 6 additions and 0 deletions

View File

@ -193,8 +193,12 @@ process_sign(void)
int len, r, ok = -1; int len, r, ok = -1;
struct sshkey *key = NULL, *found; struct sshkey *key = NULL, *found;
struct sshbuf *msg; struct sshbuf *msg;
#ifdef WITH_OPENSSL
RSA *rsa = NULL; RSA *rsa = NULL;
#ifdef OPENSSL_HAS_ECC
EC_KEY *ecdsa = NULL; EC_KEY *ecdsa = NULL;
#endif /* OPENSSL_HAS_ECC */
#endif /* WITH_OPENSSL */
/* XXX support SHA2 signature flags */ /* XXX support SHA2 signature flags */
if ((r = sshbuf_get_string(iqueue, &blob, &blen)) != 0 || if ((r = sshbuf_get_string(iqueue, &blob, &blen)) != 0 ||
@ -257,7 +261,9 @@ process_sign(void)
} }
sshkey_free(key); sshkey_free(key);
RSA_free(rsa); RSA_free(rsa);
#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
EC_KEY_free(ecdsa); EC_KEY_free(ecdsa);
#endif
free(data); free(data);
free(blob); free(blob);
free(signature); free(signature);