mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
net: tls: Add tls 1.3 support
TLS 1.3 has minor changes from TLS 1.2 at the record layer. * Header now hardcodes the same version and application content type in the header. * The real content type is appended after the data, before encryption (or after decryption). * The IV is xored with the sequence number, instead of concatinating four bytes of IV with the explicit IV. * Zero-padding: No exlicit length is given, we search backwards from the end of the decrypted data for the first non-zero byte, which is the content type. Currently recv supports reading zero-padding, but there is no way for send to add zero padding. Signed-off-by: Dave Watson <davejwatson@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fedf201e12
commit
130b392c6c
6 changed files with 154 additions and 43 deletions
|
@ -463,7 +463,8 @@ static int do_tls_setsockopt_conf(struct sock *sk, char __user *optval,
|
|||
}
|
||||
|
||||
/* check version */
|
||||
if (crypto_info->version != TLS_1_2_VERSION) {
|
||||
if (crypto_info->version != TLS_1_2_VERSION &&
|
||||
crypto_info->version != TLS_1_3_VERSION) {
|
||||
rc = -ENOTSUPP;
|
||||
goto err_crypto_info;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue