File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -491,6 +491,21 @@ impl rustls_connection {
491491 }
492492 }
493493
494+ /// Retrieves the number of TLS 1.3 tickets that have been received by a client connection.
495+ ///
496+ /// This returns 0 if the `conn` is `NULL`, or a server connection.
497+ #[ no_mangle]
498+ pub extern "C" fn rustls_connection_get_tls13_tickets_received (
499+ conn : * const rustls_connection ,
500+ ) -> u32 {
501+ ffi_panic_boundary ! {
502+ try_ref_from_ptr!( conn)
503+ . as_client( )
504+ . map( |cc| cc. tls13_tickets_received( ) )
505+ . unwrap_or_default( )
506+ }
507+ }
508+
494509 /// Write up to `count` plaintext bytes from `buf` into the `rustls_connection`.
495510 /// This will increase the number of output bytes available to
496511 /// `rustls_connection_write_tls`.
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ pub(crate) trait Defaultable: Default {}
3030
3131impl Defaultable for u16 { }
3232
33+ impl Defaultable for u32 { }
34+
3335impl Defaultable for usize { }
3436
3537impl Defaultable for bool { }
Original file line number Diff line number Diff line change @@ -1846,6 +1846,13 @@ uint16_t rustls_connection_get_negotiated_key_exchange_group(const struct rustls
18461846 */
18471847struct rustls_str rustls_connection_get_negotiated_key_exchange_group_name (const struct rustls_connection *conn);
18481848
1849+ /* *
1850+ * Retrieves the number of TLS 1.3 tickets that have been received by a client connection.
1851+ *
1852+ * This returns 0 if the `conn` is `NULL`, or a server connection.
1853+ */
1854+ uint32_t rustls_connection_get_tls13_tickets_received (const struct rustls_connection *conn);
1855+
18491856/* *
18501857 * Write up to `count` plaintext bytes from `buf` into the `rustls_connection`.
18511858 * This will increase the number of output bytes available to
You can’t perform that action at this time.
0 commit comments