Rev1833, Fix utf8 system paths

This commit is contained in:
shortcutme 2017-01-22 21:22:53 +01:00
parent 6a46181e8e
commit a0c3d7f8a6
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
7 changed files with 45 additions and 25 deletions

View file

@ -70,13 +70,14 @@ class CryptConnectionManager:
return True # Files already exits
import subprocess
cmd = "%s req -x509 -newkey rsa:2048 -sha256 -batch -keyout %s -out %s -nodes -config %s" % helper.shellquote(
self.openssl_bin,
config.data_dir+"/key-rsa.pem",
config.data_dir+"/cert-rsa.pem",
self.openssl_env["OPENSSL_CONF"]
)
proc = subprocess.Popen(
"%s req -x509 -newkey rsa:2048 -sha256 -batch -keyout %s -out %s -nodes -config %s" % helper.shellquote(
self.openssl_bin,
config.data_dir+"/key-rsa.pem",
config.data_dir+"/cert-rsa.pem",
self.openssl_env["OPENSSL_CONF"]
),
cmd.encode(sys.getfilesystemencoding()),
shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, env=self.openssl_env
)
back = proc.stdout.read().strip()