Fix bug introduced in #d08794 found by @k1-hedayati

This commit is contained in:
Lonami Exo
2017-01-13 21:22:53 +01:00
parent a5bd740b10
commit 8e48455cdc
3 changed files with 17 additions and 16 deletions

View File

@@ -124,6 +124,7 @@ def do_authentication(transport):
g, dh_prime, ga, time_offset = None, None, None, None
with BinaryReader(plain_text_answer) as dh_inner_data_reader:
dh_inner_data_reader.read(20) # hashsum
code = dh_inner_data_reader.read_int(signed=False)
if code != 0xb5890dba:
raise AssertionError('Invalid DH Inner Data code: {}'.format(code))