From f7e0b0c8a56ae03b0c3214c247ae61a939802617 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 6 Sep 2022 13:43:03 +0900 Subject: common: Fix to determine ECC curve for SSH. * common/ssh-utils.c (ssh_public_key_in_base64): Use standard name for ECC curve. -- See oidtable in common/openpgp-oid.c. Fixes-commit: 8e650dbd48fa5fde6d8f08154e6a892d495e9227 Signed-off-by: NIIBE Yutaka --- common/ssh-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/ssh-utils.c') diff --git a/common/ssh-utils.c b/common/ssh-utils.c index c2f3aef54..ab29558cf 100644 --- a/common/ssh-utils.c +++ b/common/ssh-utils.c @@ -587,11 +587,11 @@ ssh_public_key_in_base64 (gcry_sexp_t key, estream_t stream, break; case GCRY_PK_ECC: - if (!strcmp (curve, "nistp256")) + if (!strcmp (curve, "NIST P-256")) identifier = "ecdsa-sha2-nistp256"; - else if (!strcmp (curve, "nistp384")) + else if (!strcmp (curve, "NIST P-384")) identifier = "ecdsa-sha2-nistp384"; - else if (!strcmp (curve, "nistp521")) + else if (!strcmp (curve, "NIST P-521")) identifier = "ecdsa-sha2-nistp521"; else err = gpg_error (GPG_ERR_UNKNOWN_CURVE); -- cgit v1.2.3