1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

g13: Add functions to handle uint in a keyblob.

* g13/utils.c (append_tuple_uint): New.
(find_tuple_uint): New.
* g13/t-utils.c: New.
* g13/Makefile.am (noinst_PROGRAMS, TESTS): New.
(module_tests, t_common_ldadd): New.
(t_utils_SOURCES, t_utils_LDADD): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-02-10 20:44:19 +01:00
parent dc1dbc43a6
commit 4f152f3276
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 318 additions and 4 deletions

View file

@ -25,6 +25,8 @@
/* Append a new tuple to a memory buffer. */
void append_tuple (membuf_t *membuf,
int tag, const void *value, size_t length);
void append_tuple_uint (membuf_t *membuf, int tag,
unsigned long long value);
/* The tuple descriptor object. */
struct tupledesc_s;
@ -36,6 +38,8 @@ void destroy_tupledesc (tupledesc_t tupledesc);
tupledesc_t ref_tupledesc (tupledesc_t tupledesc);
const void *find_tuple (tupledesc_t tupledesc,
unsigned int tag, size_t *r_length);
gpg_error_t find_tuple_uint (tupledesc_t tupledesc, unsigned int tag,
unsigned long long *r_value);
const void *next_tuple (tupledesc_t tupledesc,
unsigned int *r_tag, size_t *r_length);