Fix possible crash for mbedtls
This commit is contained in:
parent
fe6d38b9e2
commit
b05452a9c9
@ -114,6 +114,8 @@ public:
|
||||
assert(iv.size() == 12);
|
||||
std::copy_n(iv.begin(), 12, m_iv.begin());
|
||||
m_packet_counter = 0;
|
||||
mbedtls_gcm_init(&m_aes_encrypt_context);
|
||||
mbedtls_gcm_init(&m_aes_decrypt_context);
|
||||
mbedtls_gcm_setkey(&m_aes_encrypt_context, MBEDTLS_CIPHER_ID_AES,
|
||||
key.data(), key.size() * 8);
|
||||
mbedtls_gcm_setkey(&m_aes_decrypt_context, MBEDTLS_CIPHER_ID_AES,
|
||||
|
Loading…
Reference in New Issue
Block a user