mirror of
https://github.com/adulau/crl-monitor.git
synced 2024-11-24 02:57:09 +00:00
Handle OpenSSL errors
This commit is contained in:
parent
e2c3629964
commit
b54dc68991
1 changed files with 5 additions and 1 deletions
|
@ -55,7 +55,11 @@ for l in fileinput.input(args.r):
|
|||
dercert = binascii.unhexlify(a)
|
||||
except TypeError:
|
||||
continue
|
||||
try:
|
||||
x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_ASN1, dercert)
|
||||
except OpenSSL.crypto.Error:
|
||||
continue
|
||||
|
||||
c['fp'] = x509.digest('sha1').replace(':','').lower()
|
||||
if args.v:
|
||||
print "("+c['session']+") "+c['srcip']+"<->"+c['dstip']+":"+c['dstport']
|
||||
|
|
Loading…
Reference in a new issue