Lines Matching refs:cctx
1151 struct cipher_context *cctx; in tls_set_sw_offload() local
1192 cctx = &ctx->tx; in tls_set_sw_offload()
1197 cctx = &ctx->rx; in tls_set_sw_offload()
1225 cctx->prepend_size = TLS_HEADER_SIZE + nonce_size; in tls_set_sw_offload()
1226 cctx->tag_size = tag_size; in tls_set_sw_offload()
1227 cctx->overhead_size = cctx->prepend_size + cctx->tag_size; in tls_set_sw_offload()
1228 cctx->iv_size = iv_size; in tls_set_sw_offload()
1229 cctx->iv = kmalloc(iv_size + TLS_CIPHER_AES_GCM_128_SALT_SIZE, in tls_set_sw_offload()
1231 if (!cctx->iv) { in tls_set_sw_offload()
1235 memcpy(cctx->iv, gcm_128_info->salt, TLS_CIPHER_AES_GCM_128_SALT_SIZE); in tls_set_sw_offload()
1236 memcpy(cctx->iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE, iv, iv_size); in tls_set_sw_offload()
1237 cctx->rec_seq_size = rec_seq_size; in tls_set_sw_offload()
1238 cctx->rec_seq = kmemdup(rec_seq, rec_seq_size, GFP_KERNEL); in tls_set_sw_offload()
1239 if (!cctx->rec_seq) { in tls_set_sw_offload()
1280 rc = crypto_aead_setauthsize(*aead, cctx->tag_size); in tls_set_sw_offload()
1308 kfree(cctx->rec_seq); in tls_set_sw_offload()
1309 cctx->rec_seq = NULL; in tls_set_sw_offload()
1311 kfree(cctx->iv); in tls_set_sw_offload()
1312 cctx->iv = NULL; in tls_set_sw_offload()