From df64fb318acbfee7911bee4fd021100f1d6532ed Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Mon, 17 Oct 2016 06:05:37 -0400 Subject: Remove alias logic from SCAN_Name This required taking a global lock and doing a map lookup each time an algorithm was requested (and so many times during a TLS handshake). --- src/lib/modes/aead/aead.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/modes/aead/aead.cpp') diff --git a/src/lib/modes/aead/aead.cpp b/src/lib/modes/aead/aead.cpp index 033dad94e..1b7b78be7 100644 --- a/src/lib/modes/aead/aead.cpp +++ b/src/lib/modes/aead/aead.cpp @@ -76,6 +76,12 @@ AEAD_Mode* get_aead(const std::string& algo, Cipher_Dir dir) #if defined(BOTAN_HAS_BLOCK_CIPHER) SCAN_Name req(algo); + + if(req.arg_count() == 0) + { + return nullptr; + } + std::unique_ptr bc(BlockCipher::create(req.arg(0))); if(!bc) -- cgit v1.2.3