Use separate MBEDTLS_MODE for the CCM*.

Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
diff --git a/library/cipher.c b/library/cipher.c
index 4ed6c91..ff851ec 100644
--- a/library/cipher.c
+++ b/library/cipher.c
@@ -425,7 +425,7 @@
 #endif
 
 #if defined(MBEDTLS_CCM_C)
-    if( MBEDTLS_MODE_CCM == ctx->cipher_info->mode )
+    if( MBEDTLS_MODE_CCM_STAR_NO_TAG == ctx->cipher_info->mode )
     {
         int set_lengths_result;
         int ccm_star_mode;
@@ -586,7 +586,7 @@
 #endif
 
 #if defined(MBEDTLS_CCM_C)
-    if( ctx->cipher_info->mode == MBEDTLS_MODE_CCM )
+    if( ctx->cipher_info->mode == MBEDTLS_MODE_CCM_STAR_NO_TAG )
     {
         return( mbedtls_ccm_update( (mbedtls_ccm_context *) ctx->cipher_ctx,
                                     input, ilen,
@@ -981,7 +981,7 @@
         MBEDTLS_MODE_OFB == ctx->cipher_info->mode ||
         MBEDTLS_MODE_CTR == ctx->cipher_info->mode ||
         MBEDTLS_MODE_GCM == ctx->cipher_info->mode ||
-        MBEDTLS_MODE_CCM == ctx->cipher_info->mode ||
+        MBEDTLS_MODE_CCM_STAR_NO_TAG == ctx->cipher_info->mode ||
         MBEDTLS_MODE_XTS == ctx->cipher_info->mode ||
         MBEDTLS_MODE_STREAM == ctx->cipher_info->mode )
     {