1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-21 10:09:57 +01:00

gpg: Fix minor Kyber display things.

* common/compliance.c (gnupg_pk_is_compliant): Make Kyber known.
* g10/misc.c (openpgp_pk_algo_name): Add "Kyber".
This commit is contained in:
Werner Koch 2024-04-15 13:25:07 +02:00
parent c736052e9c
commit 4e32ff209d
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 10 additions and 1 deletions

View File

@ -139,7 +139,7 @@ gnupg_pk_is_compliant (enum gnupg_compliance_mode compliance, int algo,
gcry_mpi_t key[], unsigned int keylength,
const char *curvename)
{
enum { is_rsa, is_dsa, is_elg, is_ecc } algotype;
enum { is_rsa, is_dsa, is_elg, is_ecc, is_kem } algotype;
int result = 0;
if (! initialized)
@ -173,6 +173,10 @@ gnupg_pk_is_compliant (enum gnupg_compliance_mode compliance, int algo,
case PUBKEY_ALGO_ELGAMAL:
return 0; /* Signing with Elgamal is not at all supported. */
case PUBKEY_ALGO_KYBER:
algotype = is_kem;
break;
default: /* Unknown. */
return 0;
}
@ -227,6 +231,10 @@ gnupg_pk_is_compliant (enum gnupg_compliance_mode compliance, int algo,
|| !strcmp (curvename, "brainpoolP512r1")));
break;
case is_kem:
result = 0;
break;
default:
result = 0;
}

View File

@ -836,6 +836,7 @@ openpgp_pk_algo_name (pubkey_algo_t algo)
case PUBKEY_ALGO_ECDH: return "ECDH";
case PUBKEY_ALGO_ECDSA: return "ECDSA";
case PUBKEY_ALGO_EDDSA: return "EDDSA";
case PUBKEY_ALGO_KYBER: return "Kyber";
default: return "?";
}
}