aboutsummaryrefslogtreecommitdiff
path: root/net/tls/tls_main.c
AgeCommit message (Collapse)AuthorFilesLines
2017-11-14tls: Add function to update the TLS socket configurationIlya Lesokhin1-14/+32
The tx configuration is now stored in ctx->tx_conf. And sk->sk_prot is updated trough a function This will simplify things when we add rx and support for different possible tx and rx cross configurations. Signed-off-by: Ilya Lesokhin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-07-06TLS: Fix length check in do_tls_getsockopt_tx()Matthias Rosenfelder1-1/+1
copy_to_user() copies the struct the pointer is pointing to, but the length check compares against sizeof(pointer) and not sizeof(struct). On 32-bit the size is probably the same, so it might have worked accidentally. Signed-off-by: Matthias Rosenfelder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-06-23tls: return -EFAULT if copy_to_user() failsDan Carpenter1-4/+6
The copy_to_user() function returns the number of bytes remaining but we want to return -EFAULT here. Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Dave Watson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-06-15tls: kernel TLS supportDave Watson1-0/+487
Software implementation of transport layer security, implemented using ULP infrastructure. tcp proto_ops are replaced with tls equivalents of sendmsg and sendpage. Only symmetric crypto is done in the kernel, keys are passed by setsockopt after the handshake is complete. All control messages are supported via CMSG data - the actual symmetric encryption is the same, just the message type needs to be passed separately. For user API, please see Documentation patch. Pieces that can be shared between hw and sw implementation are in tls_main.c Signed-off-by: Boris Pismenny <[email protected]> Signed-off-by: Ilya Lesokhin <[email protected]> Signed-off-by: Aviad Yehezkel <[email protected]> Signed-off-by: Dave Watson <[email protected]> Signed-off-by: David S. Miller <[email protected]>