aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_cbc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tls/tls_cbc')
-rw-r--r--src/lib/tls/tls_cbc/tls_cbc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/tls/tls_cbc/tls_cbc.cpp b/src/lib/tls/tls_cbc/tls_cbc.cpp
index e14f2ab86..b23718d89 100644
--- a/src/lib/tls/tls_cbc/tls_cbc.cpp
+++ b/src/lib/tls/tls_cbc/tls_cbc.cpp
@@ -94,8 +94,8 @@ void TLS_CBC_HMAC_AEAD_Mode::key_schedule(const uint8_t key[], size_t keylen)
if(keylen != m_cipher_keylen + m_mac_keylen)
throw Invalid_Key_Length(name(), keylen);
- cbc().set_key(&key[0], m_cipher_keylen);
- mac().set_key(&key[m_cipher_keylen], m_mac_keylen);
+ mac().set_key(&key[0], m_mac_keylen);
+ cbc().set_key(&key[m_mac_keylen], m_cipher_keylen);
}
void TLS_CBC_HMAC_AEAD_Mode::start_msg(const uint8_t nonce[], size_t nonce_len)