Remove needless ifdefs for Ed25519 support ...

... through bundled code with OpenSSL. These were needed with older OpenSSL
versions before 1.1.1.
After removal in 358ce46551 these were just static
ifdef so this will simplify the code.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
Jakub Jelen
2023-01-11 12:33:09 +01:00
parent 2187c3feae
commit 02fda2ef80
3 changed files with 6 additions and 77 deletions

View File

@@ -77,14 +77,13 @@ struct ssh_key_struct {
/* This holds either ENGINE key for PKCS#11 support or just key in
* high-level format required by OpenSSL 3.0 */
EVP_PKEY *key;
#endif /* HAVE_LIBGCRYPT */
#ifdef HAVE_LIBCRYPTO
uint8_t *ed25519_pubkey;
uint8_t *ed25519_privkey;
#else
#endif /* HAVE_LIBGCRYPT */
#ifndef HAVE_LIBCRYPTO
ed25519_pubkey *ed25519_pubkey;
ed25519_privkey *ed25519_privkey;
#endif
#endif /* HAVE_LIBCRYPTO */
ssh_string sk_application;
void *cert;
enum ssh_keytypes_e cert_type;

View File

@@ -146,10 +146,12 @@ ssh_signature pki_do_sign_hash(const ssh_key privkey,
const unsigned char *hash,
size_t hlen,
enum ssh_digest_e hash_type);
#ifndef HAVE_LIBCRYPTO
int pki_ed25519_sign(const ssh_key privkey, ssh_signature sig,
const unsigned char *hash, size_t hlen);
int pki_ed25519_verify(const ssh_key pubkey, ssh_signature sig,
const unsigned char *hash, size_t hlen);
#endif /* HAVE_LIBCRYPTO */
int pki_ed25519_key_cmp(const ssh_key k1,
const ssh_key k2,
enum ssh_keycmp_e what);