mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
19 lines
417 B
Python
Executable file
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)
|