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/mac/mac.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/mac/mac.cpp') 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( - 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))) -- cgit v1.2.3