summaryrefslogtreecommitdiff
path: root/include/uapi/linux/tls.h
diff options
context:
space:
mode:
authorDave Watson <davejwatson@fb.com>2019-01-30 21:58:31 +0000
committerDavid S. Miller <davem@davemloft.net>2019-02-01 15:00:55 -0800
commit130b392c6cd6b2aed1b7eb32253d4920babb4891 (patch)
tree99a8b337cdf5fcb3f23374b3100ed8e3ea295e19 /include/uapi/linux/tls.h
parentfedf201e12960bd2fab0596422851b20a8d80d20 (diff)
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>
Diffstat (limited to 'include/uapi/linux/tls.h')
-rw-r--r--include/uapi/linux/tls.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/tls.h b/include/uapi/linux/tls.h
index 9affceaa3db4..401d6f01de6a 100644
--- a/include/uapi/linux/tls.h
+++ b/include/uapi/linux/tls.h
@@ -51,6 +51,10 @@
#define TLS_1_2_VERSION_MINOR 0x3
#define TLS_1_2_VERSION TLS_VERSION_NUMBER(TLS_1_2)
+#define TLS_1_3_VERSION_MAJOR 0x3
+#define TLS_1_3_VERSION_MINOR 0x4
+#define TLS_1_3_VERSION TLS_VERSION_NUMBER(TLS_1_3)
+
/* Supported ciphers */
#define TLS_CIPHER_AES_GCM_128 51
#define TLS_CIPHER_AES_GCM_128_IV_SIZE 8