diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-08 08:35:28 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-03-08 14:01:54 +0100 |
commit | d7aee0a1ab76fb1299db5cf398088ebec1fe98be (patch) | |
tree | 4bc8bfddbb1ad71c89da1f827b3252fd2abb01ea | |
parent | 082bc5773abe1c003bf34bbb3bf6a6b5282a212c (diff) |
tools: Add a bit of debugging to the PEM extract handler
-rw-r--r-- | common/debug.h | 1 | ||||
-rw-r--r-- | tools/extract-pem.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/common/debug.h b/common/debug.h index eb2afa9..f8b2cf4 100644 --- a/common/debug.h +++ b/common/debug.h @@ -44,6 +44,7 @@ enum { P11_DEBUG_URI = 1 << 3, P11_DEBUG_PROXY = 1 << 4, P11_DEBUG_TRUST = 1 << 5, + P11_DEBUG_TOOL = 1 << 6, }; extern int p11_debug_current_flags; diff --git a/tools/extract-pem.c b/tools/extract-pem.c index 8777133..e2ff974 100644 --- a/tools/extract-pem.c +++ b/tools/extract-pem.c @@ -34,6 +34,8 @@ #include "config.h" +#define P11_DEBUG_FLAG P11_DEBUG_TOOL + #include "compat.h" #include "debug.h" #include "extract.h" @@ -61,6 +63,7 @@ p11_extract_pem_bundle (P11KitIter *iter, pem = p11_pem_write (ex->cert_der, ex->cert_len, "CERTIFICATE", &length); return_val_if_fail (pem != NULL, false); + p11_debug ("writing 'CERTIFICATE' PEM block of size %lu", (unsigned long)length); ret = p11_save_write (file, pem, length); free (pem); |