aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2026-10-13 14:25:11 +0200
committerWerner Koch <[email protected]>2026-10-13 14:26:22 +0200
commit1ff3bd03946f0944b6ef489fcb92014b5091c4b7 (patch)
tree49f77dc2a25388797e5cecc086fd1e8d1e9e6c70
parentgpg:tdbio: Release the lock on error path. (diff)
downloadgnupg-1ff3bd03946f0944b6ef489fcb92014b5091c4b7.tar.gz
gnupg-1ff3bd03946f0944b6ef489fcb92014b5091c4b7.zip
gpg: Fill the curve field also for the RFC9980 algos.
* g10/keylist.c (list_keyblock_colon): Print curve name for the new composite algos.
-rw-r--r--g10/keylist.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index a5adcc007..71f392147 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -2140,12 +2140,18 @@ list_keyblock_colon (ctrl_t ctrl, kbnode_t keyblock,
curvename = curve;
es_fputs (curvename, es_stdout);
}
- else if (pk->pubkey_algo == PUBKEY_ALGO_KYBER)
+ else if (pk->pubkey_algo == PUBKEY_ALGO_KYBER
+ || pk->pubkey_algo == PUBKEY_ALGO_MLD65_25519
+ || pk->pubkey_algo == PUBKEY_ALGO_MLD87_448
+ || pk->pubkey_algo == PUBKEY_ALGO_MLK768_25519
+ || pk->pubkey_algo == PUBKEY_ALGO_MLK1024_448
+ || pk->pubkey_algo == PUBKEY_ALGO_MLK768_NP384
+ || pk->pubkey_algo == PUBKEY_ALGO_MLK1024_NP521
+ || pk->pubkey_algo == PUBKEY_ALGO_MLK768_BP384
+ || pk->pubkey_algo == PUBKEY_ALGO_MLK1024_BP512)
{
- /* Note that Kyber should actually not appear here because it is
- * the primary key and Kyber is not able to certify. But we
- * prepare it here for future composite algorithms and in case
- * of faulty packets. */
+ /* The Kyber and MLK algorithms should not show up here but just
+ in case we include them anyway. */
es_fputs (pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), es_stdout);
}
es_putc (':', es_stdout); /* End of field 17. */
@@ -2321,7 +2327,15 @@ list_keyblock_colon (ctrl_t ctrl, kbnode_t keyblock,
curvename = curve;
es_fputs (curvename, es_stdout);
}
- else if (pk2->pubkey_algo == PUBKEY_ALGO_KYBER)
+ else if (pk2->pubkey_algo == PUBKEY_ALGO_KYBER
+ || pk2->pubkey_algo == PUBKEY_ALGO_MLD65_25519
+ || pk2->pubkey_algo == PUBKEY_ALGO_MLD87_448
+ || pk2->pubkey_algo == PUBKEY_ALGO_MLK768_25519
+ || pk2->pubkey_algo == PUBKEY_ALGO_MLK1024_448
+ || pk2->pubkey_algo == PUBKEY_ALGO_MLK768_NP384
+ || pk2->pubkey_algo == PUBKEY_ALGO_MLK1024_NP521
+ || pk2->pubkey_algo == PUBKEY_ALGO_MLK768_BP384
+ || pk2->pubkey_algo == PUBKEY_ALGO_MLK1024_BP512)
{
es_fputs (pubkey_string (pk2, pkstrbuf, sizeof pkstrbuf),
es_stdout);