aboutsummaryrefslogtreecommitdiff
path: root/module/icp/algs/modes/ccm.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/icp/algs/modes/ccm.c')
-rw-r--r--module/icp/algs/modes/ccm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/module/icp/algs/modes/ccm.c b/module/icp/algs/modes/ccm.c
index 9fde2684a7c4..1371676d6e68 100644
--- a/module/icp/algs/modes/ccm.c
+++ b/module/icp/algs/modes/ccm.c
@@ -6,7 +6,7 @@
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
+ * or https://opensource.org/licenses/CDDL-1.0.
* See the License for the specific language governing permissions
* and limitations under the License.
*
@@ -67,7 +67,6 @@ ccm_mode_encrypt_contiguous_blocks(ccm_ctx_t *ctx, char *data, size_t length,
return (CRYPTO_SUCCESS);
}
- lastp = (uint8_t *)ctx->ccm_cb;
crypto_init_ptrs(out, &iov_or_mp, &offset);
mac_buf = (uint8_t *)ctx->ccm_mac_buf;
@@ -658,7 +657,7 @@ ccm_format_initial_blocks(uchar_t *nonce, ulong_t nonceSize,
memset(&(b0[1+nonceSize]), 0, q);
payloadSize = aes_ctx->ccm_data_len;
- limit = 8 < q ? 8 : q;
+ limit = MIN(8, q);
for (i = 0, j = 0, k = 15; i < limit; i++, j += 8, k--) {
b0[k] = (uint8_t)((payloadSize >> j) & 0xFF);