line formatted for better reading

This commit is contained in:
2025-04-25 17:37:04 +02:00
parent f9ecd54e0a
commit f6204c9071
7 changed files with 117 additions and 364 deletions

View File

@ -17,19 +17,7 @@ PKEYFILE = "/usr/local/etc/ssl/pwgk.pem"
if not keyfile.is_file():
check_call(
[
"openssl",
"rsa",
"-in",
PKEYFILE,
"-out",
keyfile,
"-outform",
"PEM",
"-pubout",
]
)
check_call(["openssl", "rsa", "-in", PKEYFILE, "-out", keyfile, "-outform", "PEM", "-pubout"])
shutil.chown(keyfile, 1000, 1000)
if dirname.exists():
@ -41,20 +29,8 @@ if not keyfile.is_file():
for tunnels in tl:
sourcetl = f"{dirname}/{tunnels}"
tlname = f"{CRYPTFILES}{tunnels[:-5]}.dat"
check_call(
[
"openssl",
"pkeyutl",
"-encrypt",
"-inkey",
keyfile,
"-pubin",
"-in",
sourcetl,
"-out",
tlname,
]
)
check_call(["openssl", "pkeyutl", "-encrypt", "-inkey", keyfile, "-pubin", "-in", sourcetl, "-out",
tlname,])
else:
@ -68,16 +44,4 @@ else:
sourcetl = f"{dirname}/{tunnels}"
tlname = f"{CRYPTFILES}{tunnels[:-5]}.dat"
check_call(
[
"openssl",
"pkeyutl",
"-encrypt",
"-inkey",
keyfile,
"-pubin",
"-in",
sourcetl,
"-out",
tlname,
]
)
["openssl", "pkeyutl", "-encrypt", "-inkey", keyfile, "-pubin", "-in", sourcetl, "-out", tlname])