|
31 | 31 | #include "proxy/ProxyTransaction.h" |
32 | 32 | #include "records/RecHttp.h" |
33 | 33 | #include "iocore/net/TLSBasicSupport.h" |
| 34 | +#include "iocore/net/TLSEarlyDataSupport.h" |
34 | 35 | #include "iocore/net/TLSSessionResumptionSupport.h" |
35 | 36 | #include "tscore/ink_assert.h" |
36 | 37 |
|
@@ -59,6 +60,7 @@ struct ClientConnectionInfo { |
59 | 60 | // TLS handshake bytes (rx = received from client, tx = sent to client) |
60 | 61 | uint64_t tls_handshake_bytes_rx{0}; |
61 | 62 | uint64_t tls_handshake_bytes_tx{0}; |
| 63 | + size_t tls_early_data_len{0}; |
62 | 64 | }; |
63 | 65 |
|
64 | 66 | class HttpUserAgent |
@@ -105,6 +107,8 @@ class HttpUserAgent |
105 | 107 |
|
106 | 108 | uint64_t get_client_tls_handshake_bytes_tx() const; |
107 | 109 |
|
| 110 | + size_t get_client_tls_early_data_len() const; |
| 111 | + |
108 | 112 | private: |
109 | 113 | HttpVCTableEntry *m_entry{nullptr}; |
110 | 114 | IOBufferReader *m_raw_buffer_reader{nullptr}; |
@@ -194,7 +198,11 @@ HttpUserAgent::set_txn(ProxyTransaction *txn, TransactionMilestones &milestones) |
194 | 198 | milestones[TS_MILESTONE_TLS_HANDSHAKE_START] = tbs->get_tls_handshake_begin_time(); |
195 | 199 | milestones[TS_MILESTONE_TLS_HANDSHAKE_END] = tbs->get_tls_handshake_end_time(); |
196 | 200 | } |
197 | | - netvc->capture_handshake_bytes(m_conn_info.tls_handshake_bytes_rx, m_conn_info.tls_handshake_bytes_tx); |
| 201 | + tbs->get_tls_handshake_bytes(m_conn_info.tls_handshake_bytes_rx, m_conn_info.tls_handshake_bytes_tx); |
| 202 | + } |
| 203 | + |
| 204 | + if (auto eds = netvc->get_service<TLSEarlyDataSupport>()) { |
| 205 | + m_conn_info.tls_early_data_len = eds->get_early_data_len(); |
198 | 206 | } |
199 | 207 |
|
200 | 208 | if (auto as = netvc->get_service<ALPNSupport>()) { |
@@ -322,6 +330,12 @@ HttpUserAgent::get_client_tls_handshake_bytes_tx() const |
322 | 330 | return m_conn_info.tls_handshake_bytes_tx; |
323 | 331 | } |
324 | 332 |
|
| 333 | +inline size_t |
| 334 | +HttpUserAgent::get_client_tls_early_data_len() const |
| 335 | +{ |
| 336 | + return m_conn_info.tls_early_data_len; |
| 337 | +} |
| 338 | + |
325 | 339 | inline void |
326 | 340 | HttpUserAgent::save_transaction_info() |
327 | 341 | { |
|
0 commit comments