1#![allow(clippy::upper_case_acronyms)]
2#![allow(missing_docs)]
3
4#[macro_use]
5mod macros;
6
7pub(crate) mod alert;
8pub(crate) mod base;
9pub(crate) mod ccs;
10pub(crate) mod codec;
11pub(crate) mod deframer;
12pub(crate) mod enums;
13pub(crate) mod fragmenter;
14pub(crate) mod handshake;
15pub(crate) mod message;
16pub(crate) mod persist;
17
18#[cfg(test)]
19mod handshake_test;
20
21#[cfg(test)]
22mod message_test;
23
24#[cfg(test)]
25mod tests {
26 use super::codec::Reader;
27 use super::message::{Message, OpaqueMessage};
28
29 #[test]
30 fn smoketest() {
31 let bytes = include_bytes!("handshake-test.1.bin");
32 let mut r = Reader::init(bytes);
33
34 while r.any_left() {
35 let m = OpaqueMessage::read(&mut r).unwrap();
36
37 let out = m.clone().encode();
38 assert!(!out.is_empty());
39
40 Message::try_from(m.into_plain_message()).unwrap();
41 }
42 }
43}
44