From 28c6ea71c44eca613554a820619836b1418d8630 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Thu, 13 Aug 2015 13:01:53 +0000 Subject: [PATCH] Verbose output of the data store --- bin/x509/dumpx509subject.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/x509/dumpx509subject.py b/bin/x509/dumpx509subject.py index 5be9588..91826ec 100644 --- a/bin/x509/dumpx509subject.py +++ b/bin/x509/dumpx509subject.py @@ -75,12 +75,17 @@ for cert in fileinput.input(args.r): if not os.path.exists(p): os.makedirs(p) fn = os.path.join(p, fp) - if not os.path.exists(fn): + if args.v: + print (fn) + if not os.path.exists(fn): f = open(fn, 'w+') f.write(certb) f.close() if args.v: print "Certificate saved in "+fn + else: + if args.v: + print fn + " certificate already stored" try: x509 = X509.load_cert_string(certb, X509.FORMAT_DER) @@ -95,7 +100,8 @@ for cert in fileinput.input(args.r): if args.i: writer.update_document(path=unicode(fp), content=unicode(subject)+" "+unicode(issuer)) elif args.s: - r.sadd(fp, subject) + print (fp) + r.sadd(fp, subject) else: sys.exit(1)