# HG changeset patch
# User Andre Heinecke <andre.heinecke@intevation.de>
# Date 1397586365 -7200
# Node ID eab288779e079c5a63be1be491875d133ef524b7
# Parent  3be838c3e4d83cc3ab1bc2974faf98dc51a070bd
Added debug output in NSS_cert_name on failure

diff -r 3be838c3e4d8 -r eab288779e07 cinst/mozilla.c
--- a/cinst/mozilla.c	Tue Apr 15 19:05:49 2014 +0200
+++ b/cinst/mozilla.c	Tue Apr 15 20:26:05 2014 +0200
@@ -366,13 +366,15 @@
  */
 static char *
 nss_cert_name(SECItem *secitemp)
-{ char *cn_str, *o_str, *name;
+{
+  char *cn_str, *o_str, *name;
   size_t name_len;
   cn_str = x509_parse_subject(secitemp->data, secitemp->len, CERT_OID_CN);
   o_str = x509_parse_subject(secitemp->data, secitemp->len, CERT_OID_O);
   if (!cn_str || !o_str)
     {
       DEBUGPRINTF("FATAL: Could not parse certificate!");
+      DEBUGPRINTF("data len: %u \n", secitemp->len);
       exit(ERR_INVALID_CERT);
     }
   name_len = strlen(cn_str) + strlen(o_str) + 4;