Fix cert command
This commit is contained in:
parent
ef0715fad2
commit
a36e00bdc5
2 changed files with 10 additions and 5 deletions
|
|
@ -283,7 +283,7 @@ Add the domains the `/etc/hosts`:
|
||||||
Install sa:
|
Install sa:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install acct
|
sudo apt install acct python3-invoke python3-fabric
|
||||||
sudo chmod +s /sbin/sa
|
sudo chmod +s /sbin/sa
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
13
exp.py
13
exp.py
|
|
@ -244,6 +244,9 @@ for(var i in names) {
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
for config in CONFIGS:
|
||||||
|
CONFIGS[config]["name"] = config
|
||||||
|
|
||||||
def getargv(arg:str, default="", n:int=1, args:list=sys.argv):
|
def getargv(arg:str, default="", n:int=1, args:list=sys.argv):
|
||||||
if arg in args and len(args) > args.index(arg)+n:
|
if arg in args and len(args) > args.index(arg)+n:
|
||||||
return args[args.index(arg)+n]
|
return args[args.index(arg)+n]
|
||||||
|
|
@ -557,6 +560,7 @@ def run_exp(config, only_record=None, idle=False):
|
||||||
expdir = config["expdir"]
|
expdir = config["expdir"]
|
||||||
log_backup_dir = config["log_backup_dir"]
|
log_backup_dir = config["log_backup_dir"]
|
||||||
p2_path = config["p2_repodir"]
|
p2_path = config["p2_repodir"]
|
||||||
|
config_name = config["name"]
|
||||||
wattmeter = None
|
wattmeter = None
|
||||||
if config["wattmeter"]:
|
if config["wattmeter"]:
|
||||||
errmsg = YRefParam()
|
errmsg = YRefParam()
|
||||||
|
|
@ -636,10 +640,10 @@ def run_exp(config, only_record=None, idle=False):
|
||||||
first_set = True
|
first_set = True
|
||||||
for impl in exp["impls"]:
|
for impl in exp["impls"]:
|
||||||
for alg in exp["cert"]:
|
for alg in exp["cert"]:
|
||||||
|
choose_cert_alg(expdir, alg)
|
||||||
|
ssh_run(ssh, f"python {p2_path}/exp.py cert {config_name} {alg}")
|
||||||
for kex in exp["kexes"]:
|
for kex in exp["kexes"]:
|
||||||
for cipher in exp["ciphers"]:
|
for cipher in exp["ciphers"]:
|
||||||
choose_cert_alg(expdir, alg)
|
|
||||||
ssh_run(ssh, f"python {p2_path}/exp.py cert {alg}")
|
|
||||||
for setup in config["setups"]:
|
for setup in config["setups"]:
|
||||||
if SETUPS[setup]["tls_invariant"] and not first_set:
|
if SETUPS[setup]["tls_invariant"] and not first_set:
|
||||||
continue
|
continue
|
||||||
|
|
@ -783,7 +787,7 @@ if __name__ == "__main__":
|
||||||
if len(sys.argv) < 2 or sys.argv[1] in ["h", "help", "?", "-h", "-help", "--help", "/?"]:
|
if len(sys.argv) < 2 or sys.argv[1] in ["h", "help", "?", "-h", "-help", "--help", "/?"]:
|
||||||
print("""Options:
|
print("""Options:
|
||||||
make <config> [-c] Create everything
|
make <config> [-c] Create everything
|
||||||
cert <alg> Select cert signature algorithm
|
cert <config> <alg> Select cert signature algorithm
|
||||||
send <config> Send configs and certs to p2
|
send <config> Send configs and certs to p2
|
||||||
update-certs <config> Update system's certs
|
update-certs <config> Update system's certs
|
||||||
run <config> Run experiment
|
run <config> Run experiment
|
||||||
|
|
@ -816,10 +820,11 @@ Run options:
|
||||||
make_ca = "-c" in sys.argv
|
make_ca = "-c" in sys.argv
|
||||||
make_everything(config["expdir"], DOMAINS, make_ca, config["p3_suffix"], config["p3_port_plain"], config["p3_port_tls"])
|
make_everything(config["expdir"], DOMAINS, make_ca, config["p3_suffix"], config["p3_port_plain"], config["p3_port_tls"])
|
||||||
elif opt == "cert":
|
elif opt == "cert":
|
||||||
alg = sys.argv[2]
|
alg = sys.argv[3]
|
||||||
if not alg in CERT_SIGN_ALGS:
|
if not alg in CERT_SIGN_ALGS:
|
||||||
print("Error: alg must be in", CERT_SIGN_ALGS)
|
print("Error: alg must be in", CERT_SIGN_ALGS)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
config = CONFIGS[sys.argv[2]]
|
||||||
choose_cert_alg(config["expdir"], alg)
|
choose_cert_alg(config["expdir"], alg)
|
||||||
elif opt == "send":
|
elif opt == "send":
|
||||||
config = CONFIGS[sys.argv[2]]
|
config = CONFIGS[sys.argv[2]]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue