diff options
author | Jack Lloyd <[email protected]> | 2016-10-17 06:05:37 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-21 16:53:17 -0400 |
commit | df64fb318acbfee7911bee4fd021100f1d6532ed (patch) | |
tree | 20238e6f96c7d6e31539389c398255850177d970 /src/lib/modes/aead/aead.cpp | |
parent | 558808900bffc3c48da5e6d79ba602e88e619154 (diff) |
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).
Diffstat (limited to 'src/lib/modes/aead/aead.cpp')
-rw-r--r-- | src/lib/modes/aead/aead.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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<BlockCipher> bc(BlockCipher::create(req.arg(0))); if(!bc) |