<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[OSError -9984]]></title><description><![CDATA[<p dir="auto">Trying to use SSL with MQTTClient (<a href="http://simple.py" target="_blank" rel="noopener noreferrer nofollow ugc">simple.py</a>) gives this error.  Cannot find any listing anywhere to describe it.</p>
<pre><code>    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'})
</code></pre>
<p dir="auto">WLAN connection succeeded!<br />
Unhandled exception in thread started by &lt;function main_loop at 0x3ffe7d50&gt;<br />
Traceback (most recent call last):<br />
File "<a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>", line 68, in main_loop<br />
File "<a href="http://simple.py" target="_blank" rel="noopener noreferrer nofollow ugc">simple.py</a>", line 61, in connect<br />
OSError: -9984</p>
]]></description><link>https://forum.pycom.io/topic/4381/oserror-9984</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Nov 2026 18:24:34 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/4381.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Feb 2019 19:06:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OSError -9984 on Tue, 10 Mar 2020 20:30:52 GMT]]></title><description><![CDATA[<p dir="auto">That's interesting, I get that same cryptic error when I test directly over an SSL socket with a bogus certificate:</p>
<pre><code>&gt;&gt;&gt; s = socket.socket()
&gt;&gt;&gt; ss = ssl.wrap_socket(s, cert_reqs=ssl.CERT_REQUIRED, ca_certs=bad_cert)
&gt;&gt;&gt; ss.connect(socket.getaddrinfo(host, 443)[0][-1])
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
OSError: -9984
</code></pre>
<p dir="auto">With other "wrong" certificates I've gotten OSError: [Errno -30592] MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE instead.  Not sure why the difference.</p>
<p dir="auto">Anyway, I know this post is old, just putting this here in case it helps someone in the future.</p>
<p dir="auto">K</p>
]]></description><link>https://forum.pycom.io/post/32044</link><guid isPermaLink="true">https://forum.pycom.io/post/32044</guid><dc:creator><![CDATA[kruthers]]></dc:creator><pubDate>Tue, 10 Mar 2020 20:30:52 GMT</pubDate></item></channel></rss>