option skip verif

This commit is contained in:
Pascal Engélibert 2026-03-03 09:28:53 +01:00
commit 76c1b9c08c
3 changed files with 77 additions and 17 deletions

39
exp.py
View file

@ -208,10 +208,11 @@ CONFIGS = {
# i7-4790 -> i5-7300HQ
"i5": {
"experiments": [
"impl-cipher-ver",
"impl-cert-ver",
"impl-kex-ver",
"zrtt",
#"impl-cipher-ver",
#"impl-cert-ver",
#"impl-kex-ver",
#"zrtt",
"realistic",
],
"sides": [
"client",
@ -222,7 +223,7 @@ CONFIGS = {
True,
],
"records": [
{ "filename": "wikipedia", "repeat": 2000 },
{ "filename": "wikipedia", "repeat": 1000 },
],
"repo_dir": "/home/tuxmain/reps/tlsbench",
"exp_dir": "/dev/shm/exp",
@ -237,9 +238,12 @@ CONFIGS = {
"rapl": True,
"sa": True,
"listen_port": 8080,
"idle": "idle - - - - - - - - - 600.000194311142 0.0 1822 6541 1.3880000000000052 304283035 -",
"idle": "idle - - - - - - - - - 1772446308.8950071 1772447508.8950853 1200.000078201294 0 1747 6555 2.4309999999999974 564883014 -",
"notify_listen": ("0.0.0.0", 8090),
"notify_addr": "192.168.3.1:8090",
"ld_preload": {
"openssl": "/home/tuxmain/reps/tlsbench/libssl.so.3:/home/tuxmain/reps/tlsbench/libcrypto.so.3",
}
},
"i5-local": {
"experiments": [
@ -294,7 +298,7 @@ CONFIGS = {
"log_backup_dir": "/home/pengelib",
"local_addr": "TODO",
"remote_addr": "172.16.52.6",
"remote_ssh": "pengelib@nova-6",
"remote_ssh": "pengelib@gros-69",
"remote_psw": None,
"remote_repo_dir": "/home/pengelib/tlsbench",
"wattmeter": False,
@ -302,11 +306,11 @@ CONFIGS = {
"rapl": False,
"sa": False,
"listen_port": 8080,
"idle": "idle - - - - - - - - - 600.000194311142 0.0 1822 6541 1.3880000000000052 304283035 -",#TODO
"idle": "idle - - - - - - - - - 1772205368.593937 1772206568.6941307 1200.1001937389374 0 298843 2217803 0 0 -",#TODO
"notify_listen": ("0.0.0.0", 8090),
"notify_addr": "TODO:8090",
"ld_preload": {
"openssl": "LD_PRELOAD=/home/pengelib/openssl-openssl-3.6.1/libssl.so.3:/home/pengelib/openssl-openssl-3.6.1/libcrypto.so.3",
"openssl": "/home/pengelib/openssl-openssl-3.6.1/libssl.so.3:/home/pengelib/openssl-openssl-3.6.1/libcrypto.so.3",
}
},
}
@ -362,11 +366,11 @@ CERT_SIGN_ALGS = [
"rsa2048", "rsa3072", "rsa4096", # widely used
]
IMPLS = [
"aws-lc", # Amazon's crypto widely used in Rust stuff
"boring", # Google's fork of OpenSSL used in Chrome and Android
#"aws-lc", # Amazon's crypto widely used in Rust stuff
#"boring", # Google's fork of OpenSSL used in Chrome and Android
#"graviola", # New crypto in Rust
"openssl", # widely used
"ring", # used in most Rust stuff
#"ring", # used in most Rust stuff
#"symcrypt", # Microsoft's crypto
#"wolfcrypt" # used in embedded (won't build with rpxy for now)
]
@ -651,10 +655,10 @@ def run_netreplay_server(ssh, exp_dir, repo_dir, record, listen_addr, listen_por
if tls:
cmd.append("--tls")
cmdline = " ".join(cmd)
print(cmdline)
#print(cmdline)
return ssh_run_bg(ssh, cmdline, env)
def run_netreplay_client(ssh, exp_dir, repo_dir, record, remote_addr, remote_port, tls, impl, certs_dir, only_record=None, ciphers=None, kexes=None, earlydata="0", debug=False, notify_addr=None):
def run_netreplay_client(ssh, exp_dir, repo_dir, record, remote_addr, remote_port, tls, impl, certs_dir, only_record=None, ciphers=None, kexes=None, earlydata="0", debug=False, notify_addr=None, ld_preload=None, skip_verif=False):
if exp_dir[-1] != "/":
exp_dir += "/"
repo_dir = repo_dir.removesuffix("/")
@ -674,8 +678,10 @@ def run_netreplay_client(ssh, exp_dir, repo_dir, record, remote_addr, remote_por
cmd += ["--record", only_record]
if notify_addr != None:
cmd += ["-n", notify_addr]
if skip_verif:
cmd.append("-s")
cmdline = " ".join(cmd)
print(cmdline)
#print(cmdline)
return ssh_run_bg(ssh, cmdline, env)
# Run with or without SSH
@ -693,9 +699,9 @@ def ssh_run(ssh, cmd, env={}, **kwargs):
# Run with or without SSH
def ssh_run_bg(ssh, cmd, env={}, **kwargs):
print(cmd)
if ssh == None:
# As long as there is no argument containing a space (escaped or quoted), we're fine
print(cmd)
return subprocess.Popen(cmd.split(" "), env=env)
else:
# https://stackoverflow.com/questions/8775598/how-to-start-a-background-process-with-nohup-using-fabric
@ -924,6 +930,7 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False):
debug=debug,
notify_addr=config["notify_addr"],
ld_preload=config["ld_preload"] if "ld_preload" in config else None,
skip_verif=True,
)
prof_filename = "-"