Skip to content

Commit 91ff253

Browse files
committed
Fix openssl on windows
1 parent 3aea86e commit 91ff253

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ jobs:
7575
7676
- name: Prepare for tests
7777
run: |
78+
echo "::set-env name=ZERONET_OPENSSL_BIN::$((Get-Command openssl).definition)"
7879
openssl version -a
80+
openssl rand -hex 256
7981
8082
- name: Test
8183
run: |

src/Crypt/CryptConnection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ def createSslRsaCert(self):
156156
)
157157
back = proc.stdout.read().strip().decode(errors="replace").replace("\r", "")
158158
proc.wait()
159+
print(back)
160+
161+
print(subprocess.run(self.openssl_bin + " rand -hex 256", shell=True, stdout=subprocess.PIPE).stdout.decode(errors="replace"))
159162

160163
if not (os.path.isfile(self.cacert_pem) and os.path.isfile(self.cakey_pem)):
161164
self.log.error("RSA ECC SSL CAcert generation failed, CAcert or CAkey files not exist. (%s)" % back)

src/Test/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def pytest_collection_modifyitems(config, items):
7777
config.data_dir = TEST_DATA_PATH # Use test data for unittests
7878
if "ZERONET_LOG_DIR" in os.environ:
7979
config.log_dir = os.environ["ZERONET_LOG_DIR"]
80+
if "ZERONET_OPENSSL_BIN" in os.environ:
81+
config.openssl_bin_file = os.environ["ZERONET_OPENSSL_BIN"]
8082
config.initLogging(console_logging=False)
8183

8284
# Set custom formatter with realative time format (via: https://stackoverflow.com/questions/31521859/python-logging-module-time-since-last-log)

0 commit comments

Comments
 (0)