changeset 390:eab288779e07

Added debug output in NSS_cert_name on failure
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 15 Apr 2014 20:26:05 +0200
parents 3be838c3e4d8
children cbd0c1c20b30
files cinst/mozilla.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;

http://wald.intevation.org/projects/trustbridge/