Fix openssl on windows
This commit is contained in:
parent
4f5f65f7da
commit
5ddf7edf7c
|
@ -75,7 +75,9 @@ jobs:
|
|||
|
||||
- name: Prepare for tests
|
||||
run: |
|
||||
echo "::set-env name=ZERONET_OPENSSL_BIN::$((Get-Command openssl).definition)"
|
||||
openssl version -a
|
||||
openssl rand -hex 256
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
|
|
|
@ -156,6 +156,9 @@ class CryptConnectionManager:
|
|||
)
|
||||
back = proc.stdout.read().strip().decode(errors="replace").replace("\r", "")
|
||||
proc.wait()
|
||||
print(back)
|
||||
|
||||
print(subprocess.run(self.openssl_bin + " rand -hex 256", shell=True, stdout=subprocess.PIPE).stdout.decode(errors="replace"))
|
||||
|
||||
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)
|
||||
|
|
|
@ -77,6 +77,8 @@ config.trackers = []
|
|||
config.data_dir = TEST_DATA_PATH # Use test data for unittests
|
||||
if "ZERONET_LOG_DIR" in os.environ:
|
||||
config.log_dir = os.environ["ZERONET_LOG_DIR"]
|
||||
if "ZERONET_OPENSSL_BIN" in os.environ:
|
||||
config.openssl_bin_file = os.environ["ZERONET_OPENSSL_BIN"]
|
||||
config.initLogging(console_logging=False)
|
||||
|
||||
# Set custom formatter with realative time format (via: https://stackoverflow.com/questions/31521859/python-logging-module-time-since-last-log)
|
||||
|
|
Loading…
Reference in New Issue