summaryrefslogtreecommitdiff
path: root/usr/src/common/crypto/modes/gcm.c
diff options
context:
space:
mode:
authorJason King <jason.king@joyent.com>2018-01-25 18:49:57 +0000
committerJason King <jason.king@joyent.com>2018-10-04 21:14:57 -0500
commit80ecbe59bad54b13cd87628cff232f7fd4335b4b (patch)
tree22a630e6c4ffef3ea824cba5374c9d2b4d233464 /usr/src/common/crypto/modes/gcm.c
parent4c14c4cff5adaaa79d7099e153c3ace3a0d65148 (diff)
downloadillumos-joyent-OS-6576.tar.gz
OS-6576 Add CCM and GCM mode support to AES in pkcs11_softtokenOS-6576
Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/common/crypto/modes/gcm.c')
-rw-r--r--usr/src/common/crypto/modes/gcm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/common/crypto/modes/gcm.c b/usr/src/common/crypto/modes/gcm.c
index f75b0b70dd..564507abdc 100644
--- a/usr/src/common/crypto/modes/gcm.c
+++ b/usr/src/common/crypto/modes/gcm.c
@@ -20,17 +20,17 @@
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2018, Joyent, Inc.
*/
#ifndef _KERNEL
#include <strings.h>
#include <limits.h>
-#include <assert.h>
#include <security/cryptoki.h>
#endif /* _KERNEL */
-
+#include <sys/debug.h>
#include <sys/types.h>
#include <sys/kmem.h>
#include <modes/modes.h>
@@ -419,7 +419,7 @@ gcm_decrypt_final(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size,
uint64_t counter_mask = ntohll(0x00000000ffffffffULL);
int processed = 0, rv;
- ASSERT(ctx->gcm_processed_data_len == ctx->gcm_pt_buf_len);
+ ASSERT3U(ctx->gcm_processed_data_len, ==, ctx->gcm_pt_buf_len);
pt_len = ctx->gcm_processed_data_len - ctx->gcm_tag_len;
ghash = (uint8_t *)ctx->gcm_ghash;