aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-03-25 11:32:17 +0000
committerWerner Koch <[email protected]>2021-03-26 13:30:58 +0000
commit935765b451aadc63fbba763a4a00f4efa0254436 (patch)
treec8d6652d8f05d2c1bafab3e664077ef193d44ef0 /common/util.h
parentindent: Modernize mem2str. (diff)
downloadgnupg-935765b451aadc63fbba763a4a00f4efa0254436.tar.gz
gnupg-935765b451aadc63fbba763a4a00f4efa0254436.zip
common: New function to uncompress an ECC public key.
* common/sexputil.c (ec2os): New. (uncompress_ecc_q_in_canon_sexp): New. * common/t-sexputil.c (fail2): new. (test_ecc_uncompress): New. (main): Run new test. -- Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h
index 89cde696e..0427bc891 100644
--- a/common/util.h
+++ b/common/util.h
@@ -207,6 +207,10 @@ gpg_error_t get_ecc_q_from_canon_sexp (const unsigned char *keydata,
size_t keydatalen,
unsigned char const **r_q,
size_t *r_qlen);
+gpg_error_t uncompress_ecc_q_in_canon_sexp (const unsigned char *keydata,
+ size_t keydatalen,
+ unsigned char **r_newkeydata,
+ size_t *r_newkeydatalen);
int get_pk_algo_from_key (gcry_sexp_t key);
int get_pk_algo_from_canon_sexp (const unsigned char *keydata,