diff options
author | Werner Koch <[email protected]> | 2019-02-08 11:10:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-02-08 11:10:45 +0000 |
commit | 03bf8e967adb2dd13329ba1089deb419d49e55c0 (patch) | |
tree | db126df88d088d92d8908a948e448c6fbd400e8d /common/util.h | |
parent | card: Make "generate" work for PIV cards. (diff) | |
download | gnupg-03bf8e967adb2dd13329ba1089deb419d49e55c0.tar.gz gnupg-03bf8e967adb2dd13329ba1089deb419d49e55c0.zip |
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 <[email protected]>
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |