Lines Matching refs:tls_ctx

167 	struct tls_context *tls_ctx;
175 tls_ctx = tls_get_ctx(skb->sk);
176 ctx = tls_sw_ctx_rx(tls_ctx);
177 prot = &tls_ctx->prot_info;
236 struct tls_context *tls_ctx = tls_get_ctx(sk);
237 struct tls_prot_info *prot = &tls_ctx->prot_info;
238 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
281 struct tls_context *tls_ctx = tls_get_ctx(sk);
282 struct tls_prot_info *prot = &tls_ctx->prot_info;
283 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
294 struct tls_context *tls_ctx = tls_get_ctx(sk);
295 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
304 struct tls_context *tls_ctx = tls_get_ctx(sk);
305 struct tls_prot_info *prot = &tls_ctx->prot_info;
306 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
328 struct tls_context *tls_ctx = tls_get_ctx(sk);
329 struct tls_prot_info *prot = &tls_ctx->prot_info;
330 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
367 struct tls_context *tls_ctx = tls_get_ctx(sk);
368 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
379 struct tls_context *tls_ctx = tls_get_ctx(sk);
380 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
385 if (tls_is_partially_sent_record(tls_ctx)) {
394 rc = tls_push_partial_record(sk, tls_ctx, tx_flags);
415 rc = tls_push_sg(sk, tls_ctx,
440 struct tls_context *tls_ctx = tls_get_ctx(sk);
441 struct tls_prot_info *prot = &tls_ctx->prot_info;
442 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
494 struct tls_context *tls_ctx,
499 struct tls_prot_info *prot = &tls_ctx->prot_info;
511 memcpy(&rec->iv_data[iv_offset], tls_ctx->tx.iv,
514 xor_iv_with_seq(prot->version, rec->iv_data + iv_offset, tls_ctx->tx.rec_seq);
550 tls_advance_record_sn(sk, prot, &tls_ctx->tx);
675 struct tls_context *tls_ctx = tls_get_ctx(sk);
676 struct tls_prot_info *prot = &tls_ctx->prot_info;
677 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
757 tls_ctx->tx.rec_seq, prot->rec_seq_size,
760 tls_fill_prepend(tls_ctx,
766 tls_ctx->pending_open_record_frags = false;
768 rc = tls_do_encryption(sk, tls_ctx, ctx, req,
774 tls_ctx->pending_open_record_frags = true;
784 tls_ctx->pending_open_record_frags = true;
795 struct tls_context *tls_ctx = tls_get_ctx(sk);
796 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
903 struct tls_context *tls_ctx = tls_get_ctx(sk);
904 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
924 struct tls_context *tls_ctx = tls_get_ctx(sk);
925 struct tls_prot_info *prot = &tls_ctx->prot_info;
926 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
948 ret = mutex_lock_interruptible(&tls_ctx->tx_lock);
1072 tls_ctx->pending_open_record_frags = true;
1143 mutex_unlock(&tls_ctx->tx_lock);
1151 struct tls_context *tls_ctx = tls_get_ctx(sk);
1152 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
1153 struct tls_prot_info *prot = &tls_ctx->prot_info;
1222 tls_ctx->pending_open_record_frags = true;
1279 struct tls_context *tls_ctx = tls_get_ctx(sk);
1286 ret = mutex_lock_interruptible(&tls_ctx->tx_lock);
1292 mutex_unlock(&tls_ctx->tx_lock);
1299 struct tls_context *tls_ctx = tls_get_ctx(sk);
1300 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1417 struct tls_context *tls_ctx = tls_get_ctx(sk);
1418 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1419 struct tls_prot_info *prot = &tls_ctx->prot_info;
1487 memcpy(iv + iv_offset, tls_ctx->rx.iv,
1490 memcpy(iv + iv_offset, tls_ctx->rx.iv, prot->salt_size);
1492 xor_iv_with_seq(prot->version, iv + iv_offset, tls_ctx->rx.rec_seq);
1497 tls_ctx->rx.rec_seq, prot->rec_seq_size,
1553 struct tls_context *tls_ctx = tls_get_ctx(sk);
1554 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1555 struct tls_prot_info *prot = &tls_ctx->prot_info;
1560 if (tls_ctx->rx_conf == TLS_HW) {
1561 err = tls_device_decrypted(sk, tls_ctx, skb, rxm);
1573 &tls_ctx->rx);
1590 tls_advance_record_sn(sk, prot, &tls_ctx->rx);
1612 struct tls_context *tls_ctx = tls_get_ctx(sk);
1613 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1749 struct tls_context *tls_ctx = tls_get_ctx(sk);
1750 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
1751 struct tls_prot_info *prot = &tls_ctx->prot_info;
1993 struct tls_context *tls_ctx = tls_get_ctx(sock->sk);
1994 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2041 struct tls_context *tls_ctx = tls_get_ctx(sk);
2042 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2058 struct tls_context *tls_ctx = tls_get_ctx(strp->sk);
2059 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2060 struct tls_prot_info *prot = &tls_ctx->prot_info;
2120 struct tls_context *tls_ctx = tls_get_ctx(strp->sk);
2121 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2133 struct tls_context *tls_ctx = tls_get_ctx(sk);
2134 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2147 void tls_sw_cancel_work_tx(struct tls_context *tls_ctx)
2149 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
2158 struct tls_context *tls_ctx = tls_get_ctx(sk);
2159 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
2177 if (tls_ctx->partially_sent_record) {
2178 tls_free_partial_record(sk, tls_ctx);
2197 void tls_sw_free_ctx_tx(struct tls_context *tls_ctx)
2199 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
2206 struct tls_context *tls_ctx = tls_get_ctx(sk);
2207 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2209 kfree(tls_ctx->rx.rec_seq);
2210 kfree(tls_ctx->rx.iv);
2230 void tls_sw_strparser_done(struct tls_context *tls_ctx)
2232 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2237 void tls_sw_free_ctx_rx(struct tls_context *tls_ctx)
2239 struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
2246 struct tls_context *tls_ctx = tls_get_ctx(sk);
2249 tls_sw_free_ctx_rx(tls_ctx);
2259 struct tls_context *tls_ctx = tls_get_ctx(sk);
2262 if (unlikely(!tls_ctx))
2265 ctx = tls_sw_ctx_tx(tls_ctx);
2272 if (mutex_trylock(&tls_ctx->tx_lock)) {
2276 mutex_unlock(&tls_ctx->tx_lock);
2296 void tls_sw_strparser_arm(struct sock *sk, struct tls_context *tls_ctx)
2298 struct tls_sw_context_rx *rx_ctx = tls_sw_ctx_rx(tls_ctx);
2310 struct tls_context *tls_ctx = tls_get_ctx(sk);
2311 struct tls_prot_info *prot = &tls_ctx->prot_info;