Lines Matching defs:ccm_ctx
854 ccm_init_ctx(ccm_ctx_t *ccm_ctx, char *param, int kmflag,
870 ccm_ctx->ccm_mac_len = ccm_param->ulMACSize;
872 ccm_ctx->ccm_data_len = ccm_param->ulDataSize;
874 ccm_ctx->ccm_data_len =
875 ccm_param->ulDataSize - ccm_ctx->ccm_mac_len;
876 ccm_ctx->ccm_processed_mac_len = 0;
878 ccm_ctx->ccm_processed_data_len = 0;
880 ccm_ctx->ccm_flags |= CCM_MODE;
886 if (ccm_init(ccm_ctx, ccm_param->nonce, ccm_param->ulNonceSize,
895 ccm_ctx->ccm_pt_buf = kmem_alloc(ccm_ctx->ccm_data_len,
898 ccm_ctx->ccm_pt_buf = malloc(ccm_ctx->ccm_data_len);
900 if (ccm_ctx->ccm_pt_buf == NULL) {
911 ccm_ctx_t *ccm_ctx;
914 if ((ccm_ctx = kmem_zalloc(sizeof (ccm_ctx_t), kmflag)) == NULL)
916 if ((ccm_ctx = calloc(1, sizeof (ccm_ctx_t))) == NULL)
920 ccm_ctx->ccm_flags = CCM_MODE;
921 return (ccm_ctx);