line formatted for better reading
This commit is contained in:
@ -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])
|
||||
|
Reference in New Issue
Block a user