diff options
author | Werner Koch <[email protected]> | 2019-02-08 11:10:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-02-11 09:59:35 +0000 |
commit | d29d73264f607642281fb701a17015306c8fc4d7 (patch) | |
tree | 4bf8f5451dce308f2f11aa832629f3adc8cd074c /common/util.h | |
parent | common: New functions get_option_value and ascii_strupr. (diff) | |
download | gnupg-d29d73264f607642281fb701a17015306c8fc4d7.tar.gz gnupg-d29d73264f607642281fb701a17015306c8fc4d7.zip |
common: Provide function to get public key algo names in our format.
* common/sexputil.c (pubkey_algo_string): New.
--
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]>
(cherry picked from commit 03bf8e967adb2dd13329ba1089deb419d49e55c0)
Not yet used in 2.2 but will likely be needed by future backports.
Diffstat (limited to '')
-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 36f1b93a4..27f565bab 100644 --- a/common/util.h +++ b/common/util.h @@ -199,6 +199,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); |