Skip to content

Commit dd142cb

Browse files
committed
Fix line lengths
1 parent f2ded40 commit dd142cb

2 files changed

Lines changed: 49 additions & 21 deletions

File tree

README.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ verification and SRTP key export yourself.
2323
### Version selection
2424

2525
Three 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
4951
handshake messages, but it does not perform any PKI validation. Your
5052
application is responsible for validating the peer certificate according to
5153
your policy (fingerprint, chain building, name/EKU checks, pinning, etc.).
5254

5355
### Sans‑IO integration model
5456
Drive 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

src/lib.rs

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
//! ## Version selection
2222
//!
2323
//! Three constructors control which DTLS version is used:
24-
//! - [`Dtls::new_12`](https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_12) — explicit DTLS 1.2
25-
//! - [`Dtls::new_13`](https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_13) — explicit DTLS 1.3
26-
//! - [`Dtls::new_auto`](https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_auto) — auto‑sense: the first incoming ClientHello determines
27-
//! the version (based on the `supported_versions` extension)
24+
//! - [`Dtls::new_12`][new_12] — explicit DTLS 1.2
25+
//! - [`Dtls::new_13`][new_13] — explicit DTLS 1.3
26+
//! - [`Dtls::new_auto`][new_auto] — auto‑sense: the first
27+
//! incoming ClientHello determines the version (based on the
28+
//! `supported_versions` extension)
2829
//!
2930
//! # Cryptography surface
3031
//! - **Cipher suites (TLS 1.2 over DTLS)**
@@ -42,19 +43,24 @@
4243
//! - Not supported: PSK cipher suites.
4344
//!
4445
//! ## Certificate model
45-
//! During the handshake the engine emits [`Output::PeerCert`](https://docs.rs/dimpl/latest/dimpl/enum.Output.html#variant.PeerCert) with the peer's
46-
//! leaf certificate (DER). The crate uses that certificate to verify DTLS
46+
//! During the handshake the engine emits
47+
//! [`Output::PeerCert`][peer_cert] with the peer's leaf
48+
//! certificate (DER). The crate uses that certificate to verify DTLS
4749
//! handshake messages, but it does not perform any PKI validation. Your
4850
//! application is responsible for validating the peer certificate according to
4951
//! your policy (fingerprint, chain building, name/EKU checks, pinning, etc.).
5052
//!
5153
//! ## Sans‑IO integration model
5254
//! Drive the engine with three calls:
53-
//! - [`Dtls::handle_packet`](https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.handle_packet) — feed an entire received UDP datagram.
54-
//! - [`Dtls::poll_output`](https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.poll_output) — drain pending output: DTLS records, timers, events.
55-
//! - [`Dtls::handle_timeout`](https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.handle_timeout) — trigger retransmissions/time‑based progress.
55+
//! - [`Dtls::handle_packet`][handle_packet] — feed an entire
56+
//! received UDP datagram.
57+
//! - [`Dtls::poll_output`][poll_output] — drain pending output:
58+
//! DTLS records, timers, events.
59+
//! - [`Dtls::handle_timeout`][handle_timeout] — trigger
60+
//! retransmissions/time‑based progress.
5661
//!
57-
//! The output is an [`Output`](https://docs.rs/dimpl/latest/dimpl/enum.Output.html) enum with borrowed references into your provided buffer:
62+
//! The output is an [`Output`][output] enum with borrowed
63+
//! references into your provided buffer:
5864
//! - `Packet(&[u8])`: send on your UDP socket
5965
//! - `Timeout(Instant)`: schedule a timer and call `handle_timeout` at/after it
6066
//! - `Connected`: handshake complete
@@ -130,6 +136,14 @@
130136
//! - Session resumption is not implemented (WebRTC does a full handshake on ICE restart).
131137
//! - Renegotiation is not implemented (WebRTC does full restart).
132138
//!
139+
//! [new_12]: https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_12
140+
//! [new_13]: https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_13
141+
//! [new_auto]: https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.new_auto
142+
//! [peer_cert]: https://docs.rs/dimpl/latest/dimpl/enum.Output.html#variant.PeerCert
143+
//! [handle_packet]: https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.handle_packet
144+
//! [poll_output]: https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.poll_output
145+
//! [handle_timeout]: https://docs.rs/dimpl/latest/dimpl/struct.Dtls.html#method.handle_timeout
146+
//! [output]: https://docs.rs/dimpl/latest/dimpl/enum.Output.html
133147
//! [RFC 5764]: https://www.rfc-editor.org/rfc/rfc5764
134148
//! [RFC 7714]: https://www.rfc-editor.org/rfc/rfc7714
135149
//! [RFC 7627]: https://www.rfc-editor.org/rfc/rfc7627

0 commit comments

Comments
 (0)