aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgme.c')
-rw-r--r--src/gpgme.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpgme.c b/src/gpgme.c
index 4f63cc4f..e65fb38a 100644
--- a/src/gpgme.c
+++ b/src/gpgme.c
@@ -1295,6 +1295,7 @@ gpgme_pubkey_algo_string (gpgme_subkey_t subkey)
{
const char *prefix = NULL;
char *result;
+ int composite = 0;
if (!subkey)
{
@@ -1306,6 +1307,7 @@ gpgme_pubkey_algo_string (gpgme_subkey_t subkey)
{
case GPGME_PK_RSA:
case GPGME_PK_RSA_E:
+ case GPGME_PK_KYBER: composite = 1; break;
case GPGME_PK_RSA_S: prefix = "rsa"; break;
case GPGME_PK_ELG_E: prefix = "elg"; break;
case GPGME_PK_DSA: prefix = "dsa"; break;
@@ -1316,9 +1318,12 @@ gpgme_pubkey_algo_string (gpgme_subkey_t subkey)
case GPGME_PK_EDDSA: prefix = ""; break;
}
- if (prefix && *prefix)
+ if (composite && subkey->curve)
+ result = strdup (subkey->curve);
+ else if (prefix && *prefix)
{
char buffer[40];
+
snprintf (buffer, sizeof buffer, "%s%u", prefix, subkey->length);
result = strdup (buffer);
}
@@ -1341,6 +1346,7 @@ gpgme_pubkey_algo_name (gpgme_pubkey_algo_t algo)
case GPGME_PK_RSA: return "RSA";
case GPGME_PK_RSA_E: return "RSA-E";
case GPGME_PK_RSA_S: return "RSA-S";
+ case GPGME_PK_KYBER: return "KYBER";
case GPGME_PK_ELG_E: return "ELG-E";
case GPGME_PK_DSA: return "DSA";
case GPGME_PK_ECC: return "ECC";