OSError -9984
-
Trying to use SSL with MQTTClient (simple.py) gives this error. Cannot find any listing anywhere to describe it.
client = MQTTClient(client_id="", server=host,user="",password=token,port=8883, keepalive=0, ssl=True, ssl_params= {'cert_reqs':ssl.CERT_REQUIRED, 'ca_certs':'/flash/cert/ca.pem'})WLAN connection succeeded!
Unhandled exception in thread started by <function main_loop at 0x3ffe7d50>
Traceback (most recent call last):
File "main.py", line 68, in main_loop
File "simple.py", line 61, in connect
OSError: -9984 -
That's interesting, I get that same cryptic error when I test directly over an SSL socket with a bogus certificate:
>>> s = socket.socket() >>> ss = ssl.wrap_socket(s, cert_reqs=ssl.CERT_REQUIRED, ca_certs=bad_cert) >>> ss.connect(socket.getaddrinfo(host, 443)[0][-1]) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: -9984With other "wrong" certificates I've gotten OSError: [Errno -30592] MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE instead. Not sure why the difference.
Anyway, I know this post is old, just putting this here in case it helps someone in the future.
K
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login