aurweb/docker/scripts/update-step-config
Kevin Morris b98159d5b9
change(docker): use step-ca for CA + cert generation
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-27 16:43:29 -08:00

19 lines
417 B
Python
Executable file

#!/usr/bin/env python3
import json
import sys
CA_CONFIG = sys.argv[1]
with open(CA_CONFIG) as f:
data = json.load(f)
if "authority" not in data:
data["authority"] = dict()
if "claims" not in data["authority"]:
data["authority"]["claims"] = dict()
# One year of certificate duration.
data["authority"]["claims"] = {"maxTLSCertDuration": "8800h"}
with open(CA_CONFIG, "w") as f:
json.dump(data, f)