Fix direct use of cipher_info->type

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/library/cmac.c b/library/cmac.c
index 2e9c1a1..1963ba0 100644
--- a/library/cmac.c
+++ b/library/cmac.c
@@ -186,7 +186,7 @@
         return retval;
     }
 
-    type = ctx->cipher_info->type;
+    type = mbedtls_cipher_info_get_type(ctx->cipher_info);
 
     switch (type) {
         case MBEDTLS_CIPHER_AES_128_ECB: