1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::tls::rustls::msgs::handshake::Random;

#[derive(Debug)]
pub struct ConnectionRandoms {
    pub client: [u8; 32],
    pub server: [u8; 32],
}

impl ConnectionRandoms {
    pub fn new(client: Random, server: Random) -> Self {
        Self {
            client: client.0,
            server: server.0,
        }
    }
}

#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Side {
    Client,
    Server,
}

/// Data specific to the peer's side (client or server).
pub trait SideData {}