From 14e13fb7123ec20dcdf2180584908e3fdfcef94d Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 4 Mar 2022 10:57:48 +0900 Subject: common: Fix confusion of get_pk_algo_from_key. * common/ssh-utils.c (ssh_public_key_in_base64): Fix the constants. -- Fixes-commit: 8e650dbd48fa5fde6d8f08154e6a892d495e9227 Signed-off-by: NIIBE Yutaka --- common/ssh-utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common/ssh-utils.c') diff --git a/common/ssh-utils.c b/common/ssh-utils.c index bd7f192ea..c2f3aef54 100644 --- a/common/ssh-utils.c +++ b/common/ssh-utils.c @@ -572,7 +572,7 @@ ssh_public_key_in_base64 (gcry_sexp_t key, estream_t stream, if (algo == 0) return gpg_error (GPG_ERR_PUBKEY_ALGO); - if (algo == PUBKEY_ALGO_ECDSA || algo == PUBKEY_ALGO_EDDSA) + if (algo == GCRY_PK_ECC || algo == GCRY_PK_EDDSA) { curve = gcry_pk_get_curve (key, 0, NULL); if (!curve) @@ -581,12 +581,12 @@ ssh_public_key_in_base64 (gcry_sexp_t key, estream_t stream, switch (algo) { - case PUBKEY_ALGO_RSA: + case GCRY_PK_RSA: identifier = "ssh-rsa"; pub_elements = "en"; break; - case PUBKEY_ALGO_ECDSA: + case GCRY_PK_ECC: if (!strcmp (curve, "nistp256")) identifier = "ecdsa-sha2-nistp256"; else if (!strcmp (curve, "nistp384")) @@ -598,7 +598,7 @@ ssh_public_key_in_base64 (gcry_sexp_t key, estream_t stream, pub_elements = "q"; break; - case PUBKEY_ALGO_EDDSA: + case GCRY_PK_EDDSA: is_eddsa_flag = 1; if (!strcmp (curve, "Ed25519")) identifier = "ssh-ed25519"; -- cgit v1.2.3