Skip to content

Commit

Permalink
Fixed issue with certificate installation of windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hash3liZer committed Oct 3, 2021
1 parent 2415f66 commit 4c10e4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions proxverter/certgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ def __import_windows(self):
stdin=subprocess.PIPE
)

os.environ["COMSPEC"] = lpoint

if comm.strip() == b"False":
comm = subprocess.call(
'Import-PfxCertificate -FilePath \'{}\' -CertStoreLocation cert:\LocalMachine\Root\\'.format(self.home_paths['pfxname']),
'powershell.exe \'Import-PfxCertificate -FilePath "{}" -CertStoreLocation "cert:\LocalMachine\Root\\"\''.format(self.home_paths['pfxname']),
shell=True,
startupinfo=startupinfo,
stdout=subprocess.PIPE,
Expand All @@ -151,11 +153,8 @@ def __import_windows(self):
)
if comm:
raise SystemError("Error while importing certificate ")

os.environ["COMSPEC"] = lpoint
return 0
else:
os.environ["COMSPEC"] = lpoint
return 1

def __config_ln_firefox(self):
Expand Down
2 changes: 1 addition & 1 deletion proxverter/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def activate(self):
)

try:
cmline.communicate()
cmline.communicate(timeout=40)
except subprocess.TimeoutExpired:
return False
finally:
Expand Down

0 comments on commit 4c10e4e

Please sign in to comment.