@@ -23,10 +23,11 @@ verification and SRTP key export yourself.
2323### Version selection
2424
2525Three constructors control which DTLS version is used:
26- - [ ` Dtls::new_12 ` ] ( https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_12 ) — explicit DTLS 1.2
27- - [ ` Dtls::new_13 ` ] ( https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_13 ) — explicit DTLS 1.3
28- - [ ` Dtls::new_auto ` ] ( https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_auto ) — auto‑sense: the first incoming ClientHello determines
29- the version (based on the ` supported_versions ` extension)
26+ - [ ` Dtls::new_12 ` ] [ new_12 ] — explicit DTLS 1.2
27+ - [ ` Dtls::new_13 ` ] [ new_13 ] — explicit DTLS 1.3
28+ - [ ` Dtls::new_auto ` ] [ new_auto ] — auto‑sense: the first
29+ incoming ClientHello determines the version (based on the
30+ ` supported_versions ` extension)
3031
3132## Cryptography surface
3233- ** Cipher suites (TLS 1.2 over DTLS)**
@@ -44,19 +45,24 @@ Three constructors control which DTLS version is used:
4445- Not supported: PSK cipher suites.
4546
4647### Certificate model
47- During the handshake the engine emits [ ` Output::PeerCert ` ] ( https://docs.rs/dimpl/latest/dimpl/enum.Output.html#variant.PeerCert ) with the peer's
48- leaf certificate (DER). The crate uses that certificate to verify DTLS
48+ During the handshake the engine emits
49+ [ ` Output::PeerCert ` ] [ peer_cert ] with the peer's leaf
50+ certificate (DER). The crate uses that certificate to verify DTLS
4951handshake messages, but it does not perform any PKI validation. Your
5052application is responsible for validating the peer certificate according to
5153your policy (fingerprint, chain building, name/EKU checks, pinning, etc.).
5254
5355### Sans‑IO integration model
5456Drive the engine with three calls:
55- - [ ` Dtls::handle_packet ` ] ( https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.handle_packet ) — feed an entire received UDP datagram.
56- - [ ` Dtls::poll_output ` ] ( https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.poll_output ) — drain pending output: DTLS records, timers, events.
57- - [ ` Dtls::handle_timeout ` ] ( https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.handle_timeout ) — trigger retransmissions/time‑based progress.
58-
59- The output is an [ ` Output ` ] ( https://docs.rs/dimpl/latest/dimpl/enum.Output.html ) enum with borrowed references into your provided buffer:
57+ - [ ` Dtls::handle_packet ` ] [ handle_packet ] — feed an entire
58+ received UDP datagram.
59+ - [ ` Dtls::poll_output ` ] [ poll_output ] — drain pending output:
60+ DTLS records, timers, events.
61+ - [ ` Dtls::handle_timeout ` ] [ handle_timeout ] — trigger
62+ retransmissions/time‑based progress.
63+
64+ The output is an [ ` Output ` ] [ output ] enum with borrowed
65+ references into your provided buffer:
6066- ` Packet(&[u8]) ` : send on your UDP socket
6167- ` Timeout(Instant) ` : schedule a timer and call ` handle_timeout ` at/after it
6268- ` Connected ` : handshake complete
@@ -129,6 +135,14 @@ Rust 1.81.0
129135- Session resumption is not implemented (WebRTC does a full handshake on ICE restart).
130136- Renegotiation is not implemented (WebRTC does full restart).
131137
138+ [ new_12 ] : https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_12
139+ [ new_13 ] : https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_13
140+ [ new_auto ] : https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_auto
141+ [ peer_cert ] : https://docs.rs/dimpl/latest/dimpl/enum.Output.html#variant.PeerCert
142+ [ handle_packet ] : https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.handle_packet
143+ [ poll_output ] : https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.poll_output
144+ [ handle_timeout ] : https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.handle_timeout
145+ [ output ] : https://docs.rs/dimpl/latest/dimpl/enum.Output.html
132146[ RFC 5764 ] : https://www.rfc-editor.org/rfc/rfc5764
133147[ RFC 7714 ] : https://www.rfc-editor.org/rfc/rfc7714
134148[ RFC 7627 ] : https://www.rfc-editor.org/rfc/rfc7627
0 commit comments