mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
add password protocol extension, simplify protocol extension api
This commit is contained in:
parent
b0d1038a3c
commit
481128e4f5
3 changed files with 343 additions and 58 deletions
|
@ -444,7 +444,9 @@ impl Packet {
|
|||
return Err(WispError::PacketTooSmall);
|
||||
}
|
||||
if let Some(builder) = extension_builders.iter().find(|x| x.get_id() == id) {
|
||||
extensions.push(builder.build(bytes.copy_to_bytes(length), role))
|
||||
if let Ok(extension) = builder.build_from_bytes(bytes.copy_to_bytes(length), role) {
|
||||
extensions.push(extension)
|
||||
}
|
||||
} else {
|
||||
bytes.advance(length)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue