aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/mac/cbc_mac/cbc_mac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/mac/cbc_mac/cbc_mac.cpp')
-rw-r--r--src/lib/mac/cbc_mac/cbc_mac.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/mac/cbc_mac/cbc_mac.cpp b/src/lib/mac/cbc_mac/cbc_mac.cpp
index d893b922f..f07c7fe37 100644
--- a/src/lib/mac/cbc_mac/cbc_mac.cpp
+++ b/src/lib/mac/cbc_mac/cbc_mac.cpp
@@ -13,7 +13,10 @@ namespace Botan {
CBC_MAC* CBC_MAC::make(const Spec& spec)
{
if(spec.arg_count() == 1)
- return new CBC_MAC(Algo_Registry<BlockCipher>::global_registry().make(spec.arg(0)));
+ {
+ if(auto bc = make_block_cipher(spec.arg(0)))
+ return new CBC_MAC(bc.release());
+ }
return nullptr;
}