aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/cmac/cmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/cmac/cmac.c')
-rw-r--r--src/libstrongswan/plugins/cmac/cmac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/cmac/cmac.c b/src/libstrongswan/plugins/cmac/cmac.c
index e5c44d02b..725d02d76 100644
--- a/src/libstrongswan/plugins/cmac/cmac.c
+++ b/src/libstrongswan/plugins/cmac/cmac.c
@@ -279,8 +279,8 @@ METHOD(mac_t, set_key, bool,
memset(iv.ptr, 0, iv.len);
l = chunk_alloca(this->b);
memset(l.ptr, 0, l.len);
- this->k->set_key(this->k, resized);
- if (!this->k->encrypt(this->k, l, iv, NULL))
+ if (!this->k->set_key(this->k, resized) ||
+ !this->k->encrypt(this->k, l, iv, NULL))
{
return FALSE;
}