Merge pull request #2181 from imachug/patch-1
Fix UnicodeDecodeError when OpenSSL is not found
This commit is contained in:
commit
b9e71c9f6f
1 changed files with 2 additions and 2 deletions
|
@ -137,14 +137,14 @@ class CryptConnectionManager:
|
||||||
cmd, shell=True, stderr=subprocess.STDOUT,
|
cmd, shell=True, stderr=subprocess.STDOUT,
|
||||||
stdout=subprocess.PIPE, env=self.openssl_env
|
stdout=subprocess.PIPE, env=self.openssl_env
|
||||||
)
|
)
|
||||||
back = proc.stdout.read().strip().decode().replace("\r", "")
|
back = proc.stdout.read().strip().replace(b"\r", b"")
|
||||||
proc.wait()
|
proc.wait()
|
||||||
|
|
||||||
if not (os.path.isfile(self.cacert_pem) and os.path.isfile(self.cakey_pem)):
|
if not (os.path.isfile(self.cacert_pem) and os.path.isfile(self.cakey_pem)):
|
||||||
self.log.error("RSA ECC SSL CAcert generation failed, CAcert or CAkey files not exist. (%s)" % back)
|
self.log.error("RSA ECC SSL CAcert generation failed, CAcert or CAkey files not exist. (%s)" % back)
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
self.log.debug("Result: %s" % back)
|
self.log.debug("Result: %s" % back.decode())
|
||||||
|
|
||||||
# Generate certificate key and signing request
|
# Generate certificate key and signing request
|
||||||
cmd_params = helper.shellquote(
|
cmd_params = helper.shellquote(
|
||||||
|
|
Loading…
Reference in a new issue