diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-07-27 20:37:10 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-07-29 00:07:59 +0300 |
commit | 39d0e38dcced8d4da92cd11f3ff618bacc42d8a9 (patch) | |
tree | 514352c2d07cc8ffbf575a565bbe967f56f05c2a /include/net/handshake.h | |
parent | 5dd5ad682cfe9550a37634a8f55780ebd74edbe8 (diff) | |
download | linux-39d0e38dcced8d4da92cd11f3ff618bacc42d8a9.tar.xz |
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.h | 4 |
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 */ |