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: 8e650dbd48
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2022-09-06 13:43:03 +09:00
parent 7a22f764d5
commit f7e0b0c8a5
1 changed files with 3 additions and 3 deletions

View File

@ -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);