tlspuffin/tls/rustls/conn.rs
1use crate::tls::rustls::msgs::handshake::Random;
2
3#[derive(Debug)]
4pub struct ConnectionRandoms {
5 pub client: [u8; 32],
6 pub server: [u8; 32],
7}
8
9impl ConnectionRandoms {
10 pub fn new(client: Random, server: Random) -> Self {
11 Self {
12 client: client.0,
13 server: server.0,
14 }
15 }
16}
17
18#[derive(Clone, Copy, Debug, PartialEq)]
19pub enum Side {
20 Client,
21 Server,
22}
23
24/// Data specific to the peer's side (client or server).
25pub trait SideData {}