fix skip verif
This commit is contained in:
parent
c19ca3c7d1
commit
7c7414cf93
3 changed files with 6 additions and 4 deletions
|
|
@ -12,7 +12,7 @@ log = "0.4.28"
|
|||
rustls-platform-verifier = "0.6.2"
|
||||
sslrelay = { path = "../sslrelay", optional = true }
|
||||
static_cell = "2.1.1"
|
||||
tokio = { version = "1.49.0", features = ["io-util", "macros", "net", "rt", "rt-multi-thread", "sync", "time"]}
|
||||
tokio = { version = "1.49.0", features = ["io-util", "macros", "net", "rt-multi-thread", "sync", "time"]}
|
||||
tokio-rustls = "0.26.4"
|
||||
tokio-util = { version = "0.7.18", features = ["codec"] }
|
||||
x509-parser = "0.18.1"
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ struct OptClient {
|
|||
#[argp(option, short = 'c')]
|
||||
certs: Option<String>,
|
||||
/// Do not verify certificates
|
||||
#[argp(option, short = 's')]
|
||||
#[argp(switch, short = 's')]
|
||||
skip_verif: bool,
|
||||
/// Print debug info
|
||||
#[argp(switch, short = 'd')]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ pub async fn play(
|
|||
use_tls: bool,
|
||||
cert_path: &str,
|
||||
listen_addr: (&str, u16),
|
||||
_debug: bool,
|
||||
debug: bool,
|
||||
) {
|
||||
let mut response_map = HashMap::new();
|
||||
for (conn_id, (_server_name, records)) in records.iter() {
|
||||
|
|
@ -177,7 +177,9 @@ pub async fn play(
|
|||
if let Some((responses, last)) = response_map.get(&(conn_id, req_id)) {
|
||||
//dbg!(id);
|
||||
for (req_id, len) in responses {
|
||||
//println!("[SRV] response for ({}): {} bytes", id, res.len());
|
||||
if debug {
|
||||
println!("[SRV] response for ({req_id}): {len} bytes");
|
||||
}
|
||||
let mut data = dummy_bytes[0..*len as usize].to_vec();
|
||||
data[0..4].copy_from_slice(&(*len as u32).to_be_bytes());
|
||||
data[4..6].copy_from_slice(&(conn_id as u16).to_be_bytes());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue