diff options
author | NIIBE Yutaka <[email protected]> | 2022-03-04 01:57:48 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-03-04 01:57:48 +0000 |
commit | 14e13fb7123ec20dcdf2180584908e3fdfcef94d (patch) | |
tree | 2579f5b90c177d1d36096c7f690481957f4811ac /common/ssh-utils.c | |
parent | scd: Fix PK_AUTH with --challenge-response option. (diff) | |
download | gnupg-14e13fb7123ec20dcdf2180584908e3fdfcef94d.tar.gz gnupg-14e13fb7123ec20dcdf2180584908e3fdfcef94d.zip |
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 <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | common/ssh-utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
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"; |