Skip to content

Commit 4ebc7f4

Browse files
committed
temp
1 parent 5c32594 commit 4ebc7f4

File tree

1 file changed

+22
-0
lines changed
  • actix-proxy-protocol/src

1 file changed

+22
-0
lines changed

actix-proxy-protocol/src/tlv.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,28 @@ impl Tlv for UniqueId {
206206
}
207207
}
208208

209+
/// TLS (SSL)
210+
#[derive(Debug, Clone, PartialEq, Eq)]
211+
pub struct Ssl {
212+
client: u8,
213+
verify: u32,
214+
tlvs: Vec<SslTlv>,
215+
}
216+
217+
impl Tlv for Ssl {
218+
const TYPE: u8 = PP2_TYPE_SSL;
219+
220+
fn try_from_value(value: &[u8]) -> Option<Self> {
221+
const PP2_CLIENT_SSL: u8 = 0x01;
222+
const PP2_CLIENT_CERT_CONN: u8 = 0x02;
223+
const PP2_CLIENT_CERT_SESS: u8 = 0x04;
224+
}
225+
226+
fn value_bytes(&self) -> Cow<'_, [u8]> {
227+
Cow::Borrowed(&self.value)
228+
}
229+
}
230+
209231
#[cfg(test)]
210232
mod tests {
211233
use super::*;

0 commit comments

Comments
 (0)