summaryrefslogtreecommitdiffstats
path: root/include/net/handshake.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-07-27 19:37:10 +0200
committerJakub Kicinski <kuba@kernel.org>2023-07-28 23:07:59 +0200
commit39d0e38dcced8d4da92cd11f3ff618bacc42d8a9 (patch)
tree514352c2d07cc8ffbf575a565bbe967f56f05c2a /include/net/handshake.h
parentSUNRPC: Send TLS Closure alerts before closing a TCP socket (diff)
downloadlinux-39d0e38dcced8d4da92cd11f3ff618bacc42d8a9.tar.xz
linux-39d0e38dcced8d4da92cd11f3ff618bacc42d8a9.zip
net/handshake: Add helpers for parsing incoming TLS Alerts
Kernel TLS consumers can replace common TLS Alert parsing code with these helpers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/169047942074.5241.13791647439480672048.stgit@oracle-102.nfsv4bat.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/handshake.h')
-rw-r--r--include/net/handshake.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/handshake.h b/include/net/handshake.h
index bb88dfa6e3c9..8ebd4f9ed26e 100644
--- a/include/net/handshake.h
+++ b/include/net/handshake.h
@@ -42,4 +42,8 @@ int tls_server_hello_psk(const struct tls_handshake_args *args, gfp_t flags);
bool tls_handshake_cancel(struct sock *sk);
void tls_handshake_close(struct socket *sock);
+u8 tls_get_record_type(const struct sock *sk, const struct cmsghdr *msg);
+void tls_alert_recv(const struct sock *sk, const struct msghdr *msg,
+ u8 *level, u8 *description);
+
#endif /* _NET_HANDSHAKE_H */