diff options
author | 2022-04-11 12:19:11 -0700 | |
---|---|---|
committer | 2022-04-13 11:45:39 +0100 | |
commit | 72f3ad73bc866a53340cce6a0ad500d29295a8b8 (patch) | |
tree | 40491d7c408f08be7e0620a0cb705cfd06e6f176 /net/tls | |
parent | tls: rx: move counting TlsDecryptErrors for sync (diff) | |
download | linux-72f3ad73bc866a53340cce6a0ad500d29295a8b8.tar.gz linux-72f3ad73bc866a53340cce6a0ad500d29295a8b8.tar.bz2 linux-72f3ad73bc866a53340cce6a0ad500d29295a8b8.zip |
tls: rx: don't handle TLS 1.3 in the async crypto callback
Async crypto never worked with TLS 1.3 and was explicitly disabled in
commit 8497ded2d16c ("net/tls: Disable async decrytion for tls1.3").
There's no need for us to handle TLS 1.3 padding in the async cb.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_sw.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index fd970649d004..d0b7078ca3ec 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -188,17 +188,12 @@ static void tls_decrypt_done(struct crypto_async_request *req, int err) tls_err_abort(skb->sk, err); } else { struct strp_msg *rxm = strp_msg(skb); - int pad; - pad = padding_length(prot, skb); - if (pad < 0) { - ctx->async_wait.err = pad; - tls_err_abort(skb->sk, pad); - } else { - rxm->full_len -= pad; - rxm->offset += prot->prepend_size; - rxm->full_len -= prot->overhead_size; - } + /* No TLS 1.3 support with async crypto */ + WARN_ON(prot->tail_size); + + rxm->offset += prot->prepend_size; + rxm->full_len -= prot->overhead_size; } /* After using skb->sk to propagate sk through crypto async callback |