diff --git a/bin/x509/pcap-sslcert.py b/bin/x509/pcap-sslcert.py index 189cc2a..bb52bd4 100644 --- a/bin/x509/pcap-sslcert.py +++ b/bin/x509/pcap-sslcert.py @@ -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: