Reorganize private crypto header files
[openssl.git] / crypto / modes / ccm128.c
index 9edf0270e2c155c7e0aa93e9a700d7f0e4d90500..1ffd6df46f742f82bec8425187c24050836f653b 100644 (file)
@@ -7,9 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/crypto.h>
-#include "modes_lcl.h"
 #include <string.h>
+#include <openssl/crypto.h>
+#include "crypto/modes.h"
 
 /*
  * First you setup M and L parameters and pass the key schedule. This is
@@ -425,7 +425,7 @@ size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
 
     M *= 2;
     M += 2;
-    if (len < M)
+    if (len != M)
         return 0;
     memcpy(tag, ctx->cmac.c, M);
     return M;