]> granicus.if.org Git - p11-kit/commitdiff
tools: Add a bit of debugging to the PEM extract handler
authorStef Walter <stefw@gnome.org>
Fri, 8 Mar 2013 07:35:28 +0000 (08:35 +0100)
committerStef Walter <stefw@gnome.org>
Fri, 8 Mar 2013 13:01:54 +0000 (14:01 +0100)
common/debug.h
tools/extract-pem.c

index eb2afa947cdd98001fe8b4453dfc6b64e7a4fa4d..f8b2cf46cd68c7042176fc4d6a7e866c7d007d99 100644 (file)
@@ -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;
index 8777133645c0f35d4a9720ee7e1f75d09c1ee027..e2ff974b1f06205fb5b81faef0b79ca82aa61fe8 100644 (file)
@@ -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);