brynja_protocol/tls/error.rs
1//! Closed record-framing failures.
2
3/// A closed, payload-free TLS or DTLS record-framing failure.
4#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
5#[non_exhaustive]
6pub enum RecordError {
7 /// The selected parser does not support that protocol family.
8 ProfileMismatch,
9 /// The complete fixed or declared record was not available.
10 Truncated,
11 /// A checked length computation overflowed.
12 LengthOverflow,
13 /// A record exceeded its profile's fixed maximum.
14 RecordOverflow,
15 /// A record required a non-empty fragment.
16 EmptyFragment,
17 /// The content type is known but unavailable in this profile.
18 UnsupportedContentType,
19 /// RFC 6520 Heartbeat is deliberately excluded.
20 HeartbeatRejected,
21 /// TLS 1.3 application data was presented in an unprotected wire record.
22 UnprotectedApplicationData,
23 /// A protected TLS 1.3 record did not use outer type 23.
24 InvalidCiphertextType,
25 /// A protected TLS 1.3 record did not use legacy version 0x0303.
26 InvalidCiphertextVersion,
27 /// Generated TLS 1.3 plaintext did not use an allowed compatibility value.
28 InvalidPlaintextVersion,
29 /// A DTLS 1.3 plaintext record used a nonzero epoch.
30 InvalidPlaintextEpoch,
31 /// A DTLS 1.3 unified header had invalid fixed bits or layout.
32 InvalidUnifiedHeader,
33 /// DTLS 1.3 CID presence differed from the selected connection context.
34 ConnectionIdMismatch,
35 /// A caller-provided connection identifier length exceeded one byte.
36 ConnectionIdTooLong,
37 /// The caller output buffer was too small; no byte was changed.
38 InsufficientOutput,
39}