Add OpenSSL assertion on authenticator.py (#453)

aes_ige.c(88): OpenSSL internal error, assertion failed
This commit is contained in:
Maxim Smirnov 2017-11-24 20:47:36 +03:00 committed by Lonami
parent 5a4d6d4a57
commit b42b4bb326

View File

@ -113,6 +113,8 @@ def _do_authentication(connection):
key, iv = utils.generate_key_data_from_nonce(
res_pq.server_nonce, new_nonce
)
if server_dh_params.encrypted_answer % 16 != 0:
raise SecurityError('AES block size missmatch')
plain_text_answer = AES.decrypt_ige(
server_dh_params.encrypted_answer, key, iv
)