CI: use TLS in sync test

This commit is contained in:
SChernykh 2024-08-08 14:40:50 +02:00
parent 8960365f82
commit 8aad4a16b3

View file

@ -17,17 +17,25 @@ import socket
import time
import sys
import json
import ssl
f = open('stratum_dummy' + sys.argv[1] + '.log', 'wb')
f.write(b'Connecting')
f.flush()
context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
while True:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(1)
sock.setblocking(True)
if (sys.argv[1] == '1'):
sock = context.wrap_socket(sock);
if sock.connect_ex(('127.0.0.1', 3333)) == 0:
break;