mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-04-09 23:37:30 +00:00
CI: use TLS in sync test
This commit is contained in:
parent
8960365f82
commit
8aad4a16b3
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue