Added CMAC as proper low-level module and changed error returns
diff --git a/library/error.c b/library/error.c
index 71d4faa..8c38cf2 100644
--- a/library/error.c
+++ b/library/error.c
@@ -69,6 +69,10 @@
 #include "mbedtls/cipher.h"
 #endif
 
+#if defined(MBEDTLS_CMAC_C)
+#include "mbedtls/cmac.h"
+#endif
+
 #if defined(MBEDTLS_CTR_DRBG_C)
 #include "mbedtls/ctr_drbg.h"
 #endif
@@ -578,6 +582,13 @@
         mbedtls_snprintf( buf, buflen, "CCM - Authenticated decryption failed" );
 #endif /* MBEDTLS_CCM_C */
 
+#if defined(MBEDTLS_CMAC_C)
+    if( use_ret == -(MBEDTLS_ERR_CMAC_BAD_INPUT) )
+        mbedtls_snprintf( buf, buflen, "CMAC - Bad input parameters to function" );
+    if( use_ret == -(MBEDTLS_ERR_CMAC_VERIFY_FAILED) )
+        mbedtls_snprintf( buf, buflen, "CMAC - Verification failed" );
+#endif /* MBEDTLS_CMAC_C */
+
 #if defined(MBEDTLS_CTR_DRBG_C)
     if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED) )
         mbedtls_snprintf( buf, buflen, "CTR_DRBG - The entropy source failed" );