History

net: tls: export protocol version, cipher, tx_conf/rx_conf to socket diag

When an application configures kernel TLS on top of a TCP socket, it's now possible for inet_diag_handler() to collect information regarding the protocol version, the cipher type and TX / RX configuration, in case INET_DIAG_INFO is requested.

Davide Caratti committed 7 years ago

Commit 26811cc1 parent 61723b34 files · +97 −0Browse files

Showing the changes to include/uapi/linux (2 of 4 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/inet_diag.h +1 −0
  2. include/uapi/linux/tls.h +15 −0
include/uapi/linux/inet_diag.h+1−0
@@ -162,6 +162,7 @@ enum { · 161 unmodified lines
162enum {162enum {
163 INET_ULP_INFO_UNSPEC,163 INET_ULP_INFO_UNSPEC,
164 INET_ULP_INFO_NAME,164 INET_ULP_INFO_NAME,
165 INET_ULP_INFO_TLS,
165 __INET_ULP_INFO_MAX,166 __INET_ULP_INFO_MAX,
166};167};
167#define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1)168#define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1)
include/uapi/linux/tls.h+15−0
@@ -109,4 +109,19 @@ struct tls12_crypto_info_aes_ccm_128 { · 108 unmodified lines
109 unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE];109 unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE];
110};110};
111 111
112enum {
113 TLS_INFO_UNSPEC,
114 TLS_INFO_VERSION,
115 TLS_INFO_CIPHER,
116 TLS_INFO_TXCONF,
117 TLS_INFO_RXCONF,
118 __TLS_INFO_MAX,
119};
120#define TLS_INFO_MAX (__TLS_INFO_MAX - 1)
121
122#define TLS_CONF_BASE 1
123#define TLS_CONF_SW 2
124#define TLS_CONF_HW 3
125#define TLS_CONF_HW_RECORD 4
126
112#endif /* _UAPI_LINUX_TLS_H */127#endif /* _UAPI_LINUX_TLS_H */