2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-25 23:43:42 +01:00

separate AES-CBC from AES-GCM

This commit is contained in:
Hubert Kario 2015-03-31 23:23:10 +02:00
parent d773b73e45
commit b673fb976a

View File

@ -114,6 +114,7 @@ for r,d,flist in os.walk(path):
tempcipherstats = {} tempcipherstats = {}
ciphertypes = 0 ciphertypes = 0
AESGCM = False AESGCM = False
AESCBC = False
AES = False AES = False
CHACHA20 = False CHACHA20 = False
DES3 = False DES3 = False
@ -215,11 +216,13 @@ for r,d,flist in os.walk(path):
tempcipherstats['Insecure'] = 1 tempcipherstats['Insecure'] = 1
elif 'AES128-GCM' in entry['cipher'] or 'AES256-GCM' in entry['cipher']: elif 'AES128-GCM' in entry['cipher'] or 'AES256-GCM' in entry['cipher']:
if not AESGCM: if not AESGCM:
AES = True
AESGCM = True AESGCM = True
ciphertypes += 1 ciphertypes += 1
elif 'AES' in entry['cipher']: elif 'AES' in entry['cipher']:
if not AES: if not AESCBC:
AES = True AES = True
AESCBC = True
ciphertypes += 1 ciphertypes += 1
elif 'DES-CBC3' in entry['cipher']: elif 'DES-CBC3' in entry['cipher']:
if not DES3: if not DES3:
@ -402,10 +405,12 @@ for r,d,flist in os.walk(path):
cipherstats['AES-GCM Only'] += 1 cipherstats['AES-GCM Only'] += 1
if AES: if AES:
cipherstats['AES'] += 1 cipherstats['AES'] += 1
if AESCBC:
cipherstats['AES-CBC'] += 1
if ciphertypes == 1: if ciphertypes == 1:
cipherstats['AES-CBC Only'] += 1 cipherstats['AES-CBC Only'] += 1
if (AES and ciphertypes == 1) or (AESGCM and ciphertypes == 1)\ if (AESCBC and ciphertypes == 1) or (AESGCM and ciphertypes == 1)\
or (AES and AESGCM and ciphertypes == 2): or (AESCBC and AESGCM and ciphertypes == 2):
cipherstats['AES Only'] += 1 cipherstats['AES Only'] += 1
if CHACHA20: if CHACHA20:
cipherstats['CHACHA20'] += 1 cipherstats['CHACHA20'] += 1