Connection refused when trying to connect via SSL #1696
-
On my VPS, I have a simple flask server using SSL: import flask
import flask_socketio
app = flask.Flask(__name__)
socketio = flask_socketio.SocketIO(logger=True, engineio_logger=True)
socketio.init_app(app)
@socketio.on('connect')
def on_connect():
print('connected')
@app.route('/')
def main():
return 'Hello World'
app.run(host='0.0.0.0', ssl_context=('namecom.crt', 'namecom.key')) It is not behind a firewall. Opening import socketio
sio = socketio.Client()
sio.connect('https://[my domain]:5000/') It works when I tell the client not to check any certificates ( import socketio
import requests
with requests.Session() as sess:
sess.verify = 'namecom.crt'
sio = socketio.Client(http_session=sess)
sio.connect('https://[my domain]:5000/') also leads to a refused connection :( This seems similar to this issue, but it only says that the problem was fixed in an update. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm sorry but I don't understand. Are you using a self-signed certificate in your server? If you are, how do you expect this certificate to be verified by your clients? |
Beta Was this translation helpful? Give feedback.
I'm sorry but I don't understand. Are you using a self-signed certificate in your server? If you are, how do you expect this certificate to be verified by your clients?