aboutsummaryrefslogtreecommitdiffstats
path: root/g13/mount.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-02-11 12:57:35 +0000
committerWerner Koch <[email protected]>2016-02-13 16:06:40 +0000
commit13f745b50dc7031755faadb2d3476a6b6aafc739 (patch)
tree6f08695b1afdde483f0d73907228aa32a07b18c0 /g13/mount.c
parentg13: Define 3 new tags. (diff)
downloadgnupg-13f745b50dc7031755faadb2d3476a6b6aafc739.tar.gz
gnupg-13f745b50dc7031755faadb2d3476a6b6aafc739.zip
g13: Improve dump_keyblob.
* g13/g13tuple.c: Include keyblob.h. (find_tuple_uint): Factor code out to ... (convert_uint): new. (all_printable): New. * g13/mount.c (dump_keyblob: Move and rename to ... * g13/g13tuple.c (dump_tupledesc): here. Revamp and pretyy print uint values. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g13/mount.c')
-rw-r--r--g13/mount.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/g13/mount.c b/g13/mount.c
index a80f28d5e..bc54020eb 100644
--- a/g13/mount.c
+++ b/g13/mount.c
@@ -210,32 +210,6 @@ decrypt_keyblob (ctrl_t ctrl, const void *enckeyblob, size_t enckeybloblen,
}
-static void
-dump_keyblob (tupledesc_t tuples)
-{
- size_t n;
- unsigned int tag;
- const void *value;
-
- log_info ("keyblob dump:\n");
- tag = KEYBLOB_TAG_BLOBVERSION;
- value = find_tuple (tuples, tag, &n);
- while (value)
- {
- log_info (" tag: %-5u len: %-2u value: ", tag, (unsigned int)n);
- if (tag == KEYBLOB_TAG_ENCKEY
- || tag == KEYBLOB_TAG_MACKEY)
- log_printf ("[confidential]\n");
- else if (!n)
- log_printf ("[none]\n");
- else
- log_printhex ("", value, n);
- value = next_tuple (tuples, &tag, &n);
- }
-}
-
-
-
/* Mount the container with name FILENAME at MOUNTPOINT. */
gpg_error_t
g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
@@ -323,7 +297,7 @@ g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
goto leave;
}
if (opt.verbose)
- dump_keyblob (tuples);
+ dump_tupledesc (tuples);
value = find_tuple (tuples, KEYBLOB_TAG_CONTTYPE, &n);
if (!value || n != 2)