From 7de7b04b3c9684dae02d069f04e33ad59129da1e Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 4 Dec 2013 23:39:17 +0000 Subject: Support the normal names for CCM in TLS policy config --- src/modes/aead/aead.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/modes/aead/aead.cpp') diff --git a/src/modes/aead/aead.cpp b/src/modes/aead/aead.cpp index 980a212d4..d913c7c3a 100644 --- a/src/modes/aead/aead.cpp +++ b/src/modes/aead/aead.cpp @@ -51,9 +51,18 @@ AEAD_Mode* get_aead(const std::string& algo_spec, Cipher_Dir direction) return nullptr; #if defined(BOTAN_HAS_AEAD_CCM) + if(mode_name == "CCM-8") + { + if(direction == ENCRYPTION) + return new CCM_Encryption(cipher->clone(), 8, 3); + else + return new CCM_Decryption(cipher->clone(), 8, 3); + } + if(mode_name == "CCM") { const size_t L = (mode_info.size() > 2) ? to_u32bit(mode_info[2]) : 3; + if(direction == ENCRYPTION) return new CCM_Encryption(cipher->clone(), tag_size, L); else -- cgit v1.2.3