aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-04-09 13:06:56 -0400
committerJack Lloyd <[email protected]>2018-04-09 18:48:46 -0400
commit6cfe771a5ced6c87eda98bfdfcd0811490d45baa (patch)
treee02481416011bdb63398698da4da0c73324d764c /src/lib
parent3aa5aabc3c134a50c90dad87caccee7d2532088e (diff)
Fix bug that broke session decryption (and thus resumption)
Introduced in 3657639ab. Add a test that would have caught this
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/tls/tls_session.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/tls/tls_session.cpp b/src/lib/tls/tls_session.cpp
index 85443949d..0f603454b 100644
--- a/src/lib/tls/tls_session.cpp
+++ b/src/lib/tls/tls_session.cpp
@@ -202,7 +202,7 @@ Session Session::decrypt(const uint8_t in[], size_t in_len, const SymmetricKey&
{
try
{
- std::unique_ptr<AEAD_Mode> aead = AEAD_Mode::create_or_throw("AES-256/GCM", ENCRYPTION);
+ std::unique_ptr<AEAD_Mode> aead = AEAD_Mode::create_or_throw("AES-256/GCM", DECRYPTION);
const size_t nonce_len = aead->default_nonce_length();
if(in_len < nonce_len + aead->tag_size())