2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-12-25 20:23:41 +01:00

parse_results.py: compatibility with old results files

This commit is contained in:
Hubert Kario 2014-06-04 18:52:39 +02:00
parent be0439ef99
commit 7591062bbc

View File

@ -55,7 +55,7 @@ for r,d,flist in os.walk(path):
dualstack = False
ECDSA = False
trusted = False
ocsp_stapling = False
ocsp_stapling = None
""" process the file """
f_abs = os.path.join(r,f)
@ -151,13 +151,15 @@ for r,d,flist in os.walk(path):
tempsigstats[entry['sigalg'][0]] = 1
""" save tls ticket hint """
tempticketstats[entry['ticket_hint']] = 1
if 'ticket_hint' in entry:
tempticketstats[entry['ticket_hint']] = 1
""" check if OCSP stapling is supported """
if entry['ocsp_stapling'] == 'True':
ocsp_stapling=True
else:
ocsp_stapling=False
if 'ocsp_stapling' in entry:
if entry['ocsp_stapling'] == 'True':
ocsp_stapling=True
else:
ocsp_stapling=False
""" store the versions of TLS supported """
for protocol in entry['protocols']:
@ -207,7 +209,9 @@ for r,d,flist in os.walk(path):
for s in tempticketstats:
tickethint[s] += 1
if ocsp_stapling:
if ocsp_stapling is None:
ocspstaple['Unknown'] += 1
elif ocsp_stapling:
ocspstaple['Supported'] += 1
else:
ocspstaple['Unsupported'] += 1
@ -258,6 +262,8 @@ for r,d,flist in os.walk(path):
handshakestats['ECDHE'] += 1
if DHE:
handshakestats['DHE'] += 1
if DHE and ECDHE:
handshakestats['ECDHE and DHE'] += 1
if ECDH:
handshakestats['ECDH'] += 1
if DH: