aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/mac/mac.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-10-17 06:05:37 -0400
committerJack Lloyd <[email protected]>2016-10-21 16:53:17 -0400
commitdf64fb318acbfee7911bee4fd021100f1d6532ed (patch)
tree20238e6f96c7d6e31539389c398255850177d970 /src/lib/mac/mac.cpp
parent558808900bffc3c48da5e6d79ba602e88e619154 (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/mac/mac.cpp')
-rw-r--r--src/lib/mac/mac.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/mac/mac.cpp b/src/lib/mac/mac.cpp
index 919ce959d..70807b39f 100644
--- a/src/lib/mac/mac.cpp
+++ b/src/lib/mac/mac.cpp
@@ -67,15 +67,15 @@ MessageAuthenticationCode::create(const std::string& algo_spec,
if(provider.empty() || provider == "base")
{
return std::unique_ptr<MessageAuthenticationCode>(
- new SipHash(req.arg_as_integer(0, 2),
- req.arg_as_integer(1, 4)));
+ new SipHash(req.arg_as_integer(0, 2), req.arg_as_integer(1, 4)));
}
}
#endif
#if defined(BOTAN_HAS_CMAC)
- if(req.algo_name() == "CMAC" && req.arg_count() == 1)
+ if((req.algo_name() == "CMAC" || req.algo_name() == "OMAC") && req.arg_count() == 1)
{
+ // TODO: OpenSSL CMAC
if(provider.empty() || provider == "base")
{
if(auto bc = BlockCipher::create(req.arg(0)))