Skip to main content

brynja_protocol/
lib.rs

1//! Shared allocation-free wire framing for Brynja protocol engines.
2//!
3//! The crate parses and writes record envelopes only. It does not negotiate a
4//! protocol version, decrypt records, maintain replay state, or implement a
5//! handshake. Callers must supply an already selected typed protocol profile.
6
7#![no_std]
8
9pub mod tls;
10
11pub use tls::{
12    ContentType, ContentTypeClass, ContentTypeCode, Dtls12Ciphertext, Dtls13Ciphertext,
13    Dtls13CiphertextConfig, Dtls13CiphertextHeader, Dtls13Sequence, DtlsPlaintext,
14    HEARTBEAT_EXTENSION_TYPE, LegacyRecordVersion, RecordError, TlsCiphertext, TlsPlaintext,
15    WirePolicy, encode_dtls13_ciphertext,
16};
17
18/// Whether the bounded TLS and DTLS framing boundary is implemented.
19pub const TLS_DTLS_RECORD_FRAMING_IMPLEMENTED: bool = true;
20
21#[cfg(test)]
22mod tests {
23    #[test]
24    fn package_claims_only_record_framing() {
25        assert!(::core::hint::black_box(
26            super::TLS_DTLS_RECORD_FRAMING_IMPLEMENTED
27        ));
28    }
29}