gpg: Fix handling of importing cv25519 secret key.

* g10/import.c (transfer_secret_keys): Only emit a warning when secret
key is not encrypted.

--

Fixing-commit: dbfb7f809b
GnuPG-bug-id: 6322
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-04-06 11:32:52 +09:00
parent c9e95b8dee
commit cb055ecb91
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054
1 changed files with 1 additions and 0 deletions

View File

@ -2656,6 +2656,7 @@ transfer_secret_keys (ctrl_t ctrl, struct import_stats_s *stats,
* in case of cv25519. We have only opaque MPIs here. */
if (pk->pubkey_algo == PUBKEY_ALGO_ECDH
&& !strcmp (curvestr, "1.3.6.1.4.1.3029.1.5.1")
&& !gcry_mpi_get_flag (pk->pkey[i], GCRYMPI_FLAG_USER1)
&& gcry_mpi_get_flag (pk->pkey[i], GCRYMPI_FLAG_OPAQUE))
{
const unsigned char *pp;