diff options
author | Werner Koch <[email protected]> | 2016-02-10 19:44:19 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-02-13 16:06:39 +0000 |
commit | 4f152f3276b6d40d2568a27e74903dd18b41d752 (patch) | |
tree | 3abbcc54a63e6b0aaf2742c3fe3c6341e0195b74 /g13/utils.h | |
parent | g13: Re-factor high level create code. (diff) | |
download | gnupg-4f152f3276b6d40d2568a27e74903dd18b41d752.tar.gz gnupg-4f152f3276b6d40d2568a27e74903dd18b41d752.zip |
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 <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g13/utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
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); |