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.
Showing the changes to include/uapi/linux (2 of 4 files). Show all
Unified · Split
| @@ -162,6 +162,7 @@ enum { · 161 unmodified lines | ||
| 162 | 162 | enum { |
| 163 | 163 | INET_ULP_INFO_UNSPEC, |
| 164 | 164 | INET_ULP_INFO_NAME, |
| 165 | + INET_ULP_INFO_TLS, | |
| 165 | 166 | __INET_ULP_INFO_MAX, |
| 166 | 167 | }; |
| 167 | 168 | #define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1) |
| @@ -109,4 +109,19 @@ struct tls12_crypto_info_aes_ccm_128 { · 108 unmodified lines | ||
| 109 | 109 | unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE]; |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | +enum { | |
| 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 | 127 | #endif /* _UAPI_LINUX_TLS_H */ |