Skip to content
Snippets Groups Projects

Accept and transmit padding in introduce2 plaintexts

Merged Nick Mathewson requested to merge nickm/arti:pad_intro2 into main
All threads resolved!
2 files
+ 45
10
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -150,9 +150,10 @@ impl IntroRequest {
let intro_payload: IntroduceHandshakePayload = {
let mut r = tor_bytes::Reader::from_slice(&msg_body);
let payload = r.extract().map_err(E::InvalidPayload)?;
r.should_be_exhausted().map_err(E::InvalidPayload)?;
payload
r.extract().map_err(E::InvalidPayload)?
// Note: we _do not_ call `should_be_exhausted` here, since we
// explicitly expect the payload of an introduce2 message to be
// padded to hide its size.
};
// We build the OwnedChanTargetBuilder now, so that we can detect any
Loading