From 4f152f3276b6d40d2568a27e74903dd18b41d752 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 10 Feb 2016 20:44:19 +0100 Subject: 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 --- g13/utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'g13/utils.h') diff --git a/g13/utils.h b/g13/utils.h index 914b2cf3e..6c3902b90 100644 --- a/g13/utils.h +++ b/g13/utils.h @@ -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); -- cgit