]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
improved test and added debugging
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 5 Apr 2012 16:30:53 +0000 (18:30 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 5 Apr 2012 16:30:53 +0000 (18:30 +0200)
tests/pkcs12-decode/pkcs12

index e35004fa24cf3ee3de4e4db006e4e2d547e51822..3cbe4761db92b875e19acfca5d30fa3de1e921b6 100755 (executable)
 
 srcdir=${srcdir:-.}
 CERTTOOL=${CERTTOOL:-../../src/certtool}
+DEBUG=""
+
+if test "x$1" != "x";then
+  DEBUG="1"
+fi
 
 ret=0
 for p12 in 'client.p12 foobar' noclient.p12 unclient.p12 pkcs12_2certs.p12; do
     set -- $p12
     file=$1
     passwd=$2
-    $CERTTOOL --p12-info --inder --password "$passwd" \
-               --infile $srcdir/$file > out 2>&1
+    if test "x$DEBUG" != "x";then
+      $CERTTOOL -d 99 --p12-info --inder --password "$passwd" \
+               --infile $srcdir/$file
+    else
+      $CERTTOOL --p12-info --inder --password "$passwd" \
+               --infile $srcdir/$file >/dev/null 2>&1
+    fi
     rc=$?
     if test $rc != 0; then
-       cat out
        echo "NEON PKCS12 FATAL $p12"
        ret=1
-    else
-       echo "NEON PKCS12 OK $p12"
     fi
 done
-rm -f out
 
-echo "NEON PKCS12 DONE (rc $ret)"
+#echo "NEON PKCS12 DONE (rc $ret)"
 exit $ret