From c4b6b35bfa98e478f1d13f4ce3e664771f2604c2 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sun, 30 Aug 2015 19:04:44 +0200 Subject: Add gpgme_pubkey_algo_string * src/gpgme.h.in (GPGME_PK_EDDSA): New. (gpgme_pubkey_algo_string): New. * src/conversion.c (_gpgme_map_pk_algo): Add new algo. * src/gpgme.c (gpgme_pubkey_algo_string): New. (gpgme_pubkey_algo_name): Reformat. Signed-off-by: Werner Koch --- src/gpgme.h.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gpgme.h.in') diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 6cea2c77..e7216cbe 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -261,7 +261,8 @@ typedef enum GPGME_PK_ECC = 18, GPGME_PK_ELG = 20, GPGME_PK_ECDSA = 301, - GPGME_PK_ECDH = 302 + GPGME_PK_ECDH = 302, + GPGME_PK_EDDSA = 303 } gpgme_pubkey_algo_t; @@ -1218,7 +1219,8 @@ gpgme_error_t gpgme_data_new_from_mem (gpgme_data_t *r_dh, size is returned in R_LEN. */ char *gpgme_data_release_and_get_mem (gpgme_data_t dh, size_t *r_len); -/* Release the memory returned by gpgme_data_release_and_get_mem(). */ +/* Release the memory returned by gpgme_data_release_and_get_mem() and + some other functions. */ void gpgme_free (void *buffer); gpgme_error_t gpgme_data_new_from_cbs (gpgme_data_t *dh, @@ -2232,6 +2234,10 @@ gpgme_error_t gpgme_engine_check_version (gpgme_protocol_t proto); void gpgme_result_ref (void *result); void gpgme_result_unref (void *result); +/* Return a public key algorithm string (e.g. "rsa2048"). Caller must + free using gpgme_free. */ +char *gpgme_pubkey_algo_string (gpgme_subkey_t subkey); + /* Return a statically allocated string with the name of the public key algorithm ALGO, or NULL if that name is not known. */ const char *gpgme_pubkey_algo_name (gpgme_pubkey_algo_t algo); -- cgit v1.2.3