Lines Matching defs:tls_ctx

194 	struct tls_context *tls_ctx;
216 tls_ctx = tls_get_ctx(sk);
217 ctx = tls_sw_ctx_rx(tls_ctx);
260 struct tls_context *tls_ctx = tls_get_ctx(sk);
261 struct tls_prot_info *prot = &tls_ctx->prot_info;
262 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
309 struct tls_context *tls_ctx = tls_get_ctx(sk);
310 struct tls_prot_info *prot = &tls_ctx->prot_info;
311 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
322 struct tls_context *tls_ctx = tls_get_ctx(sk);
323 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
332 struct tls_context *tls_ctx = tls_get_ctx(sk);
333 struct tls_prot_info *prot = &tls_ctx->prot_info;
334 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
356 struct tls_context *tls_ctx = tls_get_ctx(sk);
357 struct tls_prot_info *prot = &tls_ctx->prot_info;
358 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
397 struct tls_context *tls_ctx = tls_get_ctx(sk);
398 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
409 struct tls_context *tls_ctx = tls_get_ctx(sk);
410 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
415 if (tls_is_partially_sent_record(tls_ctx)) {
424 rc = tls_push_partial_record(sk, tls_ctx, tx_flags);
445 rc = tls_push_sg(sk, tls_ctx,
469 struct tls_context *tls_ctx;
482 tls_ctx = tls_get_ctx(sk);
483 prot = &tls_ctx->prot_info;
484 ctx = tls_sw_ctx_tx(tls_ctx);
534 struct tls_context *tls_ctx,
539 struct tls_prot_info *prot = &tls_ctx->prot_info;
557 memcpy(&rec->iv_data[iv_offset], tls_ctx->tx.iv,
561 tls_ctx->tx.rec_seq);
602 tls_advance_record_sn(sk, prot, &tls_ctx->tx);
727 struct tls_context *tls_ctx = tls_get_ctx(sk);
728 struct tls_prot_info *prot = &tls_ctx->prot_info;
729 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
809 tls_ctx->tx.rec_seq, record_type, prot);
811 tls_fill_prepend(tls_ctx,
817 tls_ctx->pending_open_record_frags = false;
819 rc = tls_do_encryption(sk, tls_ctx, ctx, req,
825 tls_ctx->pending_open_record_frags = true;
835 tls_ctx->pending_open_record_frags = true;
846 struct tls_context *tls_ctx = tls_get_ctx(sk);
847 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
963 struct tls_context *tls_ctx = tls_get_ctx(sk);
964 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
1016 struct tls_context *tls_ctx = tls_get_ctx(sk);
1017 struct tls_prot_info *prot = &tls_ctx->prot_info;
1018 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
1100 tls_ctx->pending_open_record_frags = true;
1176 tls_ctx->pending_open_record_frags = true;
1239 struct tls_context *tls_ctx = tls_get_ctx(sk);
1247 ret = mutex_lock_interruptible(&tls_ctx->tx_lock);
1253 mutex_unlock(&tls_ctx->tx_lock);
1263 struct tls_context *tls_ctx = tls_get_ctx(sk);
1264 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
1274 mutex_lock(&tls_ctx->tx_lock);
1315 mutex_unlock(&tls_ctx->tx_lock);
1322 struct tls_context *tls_ctx = tls_get_ctx(sk);
1323 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1480 struct tls_context *tls_ctx = tls_get_ctx(sk);
1481 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1482 struct tls_prot_info *prot = &tls_ctx->prot_info;
1558 memcpy(&dctx->iv[iv_offset], tls_ctx->rx.iv,
1566 memcpy(&dctx->iv[iv_offset], tls_ctx->rx.iv, prot->salt_size);
1568 tls_xor_iv_with_seq(prot, &dctx->iv[iv_offset], tls_ctx->rx.rec_seq);
1573 tls_ctx->rx.rec_seq, tlm->control, prot);
1649 tls_decrypt_sw(struct sock *sk, struct tls_context *tls_ctx,
1652 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1653 struct tls_prot_info *prot = &tls_ctx->prot_info;
1672 return tls_decrypt_sw(sk, tls_ctx, msg, darg);
1690 struct tls_context *tls_ctx, struct tls_decrypt_arg *darg)
1692 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1693 struct tls_prot_info *prot = &tls_ctx->prot_info;
1697 if (tls_ctx->rx_conf != TLS_HW)
1700 err = tls_device_decrypted(sk, tls_ctx);
1771 struct tls_context *tls_ctx = tls_get_ctx(sk);
1772 struct tls_prot_info *prot = &tls_ctx->prot_info;
1776 err = tls_decrypt_device(sk, msg, tls_ctx, darg);
1778 err = tls_decrypt_sw(sk, tls_ctx, msg, darg);
1785 tls_advance_record_sn(sk, prot, &tls_ctx->rx);
1787 return tls_check_pending_rekey(sk, tls_ctx, darg->skb);
2001 struct tls_context *tls_ctx = tls_get_ctx(sk);
2002 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2003 struct tls_prot_info *prot = &tls_ctx->prot_info;
2223 struct tls_context *tls_ctx = tls_get_ctx(sock->sk);
2224 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2293 struct tls_context *tls_ctx = tls_get_ctx(sk);
2294 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2295 struct tls_prot_info *prot = &tls_ctx->prot_info;
2388 struct tls_context *tls_ctx = tls_get_ctx(sk);
2389 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2405 struct tls_context *tls_ctx = tls_get_ctx(strp->sk);
2406 struct tls_prot_info *prot = &tls_ctx->prot_info;
2473 struct tls_context *tls_ctx = tls_get_ctx(sk);
2474 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2493 void tls_sw_cancel_work_tx(struct tls_context *tls_ctx)
2495 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
2504 struct tls_context *tls_ctx = tls_get_ctx(sk);
2505 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
2516 if (tls_ctx->partially_sent_record) {
2517 tls_free_partial_record(sk, tls_ctx);
2536 void tls_sw_free_ctx_tx(struct tls_context *tls_ctx)
2538 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
2545 struct tls_context *tls_ctx = tls_get_ctx(sk);
2546 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2564 void tls_sw_strparser_done(struct tls_context *tls_ctx)
2566 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2571 void tls_sw_free_ctx_rx(struct tls_context *tls_ctx)
2573 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2580 struct tls_context *tls_ctx = tls_get_ctx(sk);
2583 tls_sw_free_ctx_rx(tls_ctx);
2593 struct tls_context *tls_ctx = tls_get_ctx(sk);
2596 if (unlikely(!tls_ctx))
2599 ctx = tls_sw_ctx_tx(tls_ctx);
2606 if (mutex_trylock(&tls_ctx->tx_lock)) {
2610 mutex_unlock(&tls_ctx->tx_lock);
2641 void tls_sw_strparser_arm(struct sock *sk, struct tls_context *tls_ctx)
2643 struct tls_sw_context_rx *rx_ctx = tls_sw_ctx_rx(tls_ctx);
2651 void tls_update_rx_zc_capable(struct tls_context *tls_ctx)
2653 struct tls_sw_context_rx *rx_ctx = tls_sw_ctx_rx(tls_ctx);
2655 rx_ctx->zc_capable = tls_ctx->rx_no_pad ||
2656 tls_ctx->prot_info.version != TLS_1_3_VERSION;
2732 static void tls_finish_key_update(struct sock *sk, struct tls_context *tls_ctx)
2734 struct tls_sw_context_rx *ctx = tls_ctx->priv_ctx_rx;