diff options
author | lloyd <[email protected]> | 2013-12-04 23:39:17 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-12-04 23:39:17 +0000 |
commit | 7de7b04b3c9684dae02d069f04e33ad59129da1e (patch) | |
tree | f70c035f345c0ce32f6132b287cb0bc3b161a35f /src/modes/aead/aead.cpp | |
parent | 0cfa7beb27a7f2247b7626810c077a1204c69dbf (diff) |
Support the normal names for CCM in TLS policy config
Diffstat (limited to 'src/modes/aead/aead.cpp')
-rw-r--r-- | src/modes/aead/aead.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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 |