Handle unset DN

This commit is contained in:
Alexandre Dulaunoy 2015-04-23 13:59:00 +02:00
parent e91731d82b
commit 0d90f20ed7

View file

@ -73,7 +73,10 @@ for l in fileinput.input(args.r):
if args.j:
print (json.dumps(c))
elif args.f:
print (c['dstip']+","+c['fp']+","+x509.get_subject().CN)
subject = x509.get_subject().CN
if subject is None:
subject = ""
print (c['dstip']+","+c['fp']+","+subject
elif args.s:
print (c['fp']+","+base64.standard_b64encode(dercert))
else: