From 03bf8e967adb2dd13329ba1089deb419d49e55c0 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 8 Feb 2019 12:10:45 +0100 Subject: common: Provide function to get public key algo names in our format. * tools/card-tool-misc.c (pubkey_algo_string): Move to ... * common/sexputil.c (pubkey_algo_string): here. -- The new gpg format for public key algorithms is useful at other places as well. Thus we make this new function available. Note that the code we use in gpg is not based on s-expressions and thus a new function was required. Signed-off-by: Werner Koch --- common/util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'common/util.h') diff --git a/common/util.h b/common/util.h index 863f9e36f..d5bb225a7 100644 --- a/common/util.h +++ b/common/util.h @@ -189,6 +189,7 @@ gpg_error_t get_rsa_pk_from_canon_sexp (const unsigned char *keydata, int get_pk_algo_from_key (gcry_sexp_t key); int get_pk_algo_from_canon_sexp (const unsigned char *keydata, size_t keydatalen); +char *pubkey_algo_string (gcry_sexp_t s_pkey); /*-- convert.c --*/ int hex2bin (const char *string, void *buffer, size_t length); -- cgit v1.2.3