[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)
pravinkumarbala opened this issue · 3 comments
I try to Publish the aws iot from PyCharm but handshake is not happening
File "E:\FinalProject\learning\src\publisher.py", line 29, in init
self._connect()
File "E:\FinalProject\learning\src\publisher.py", line 32, in _connect
self.myAWSIoTMQTTClient.connect()
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\site-packages\AWSIoTPythonSDK\MQTTLib.py", line 513, in connect
return self._mqtt_core.connect(keepAliveIntervalSecond)
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\site-packages\AWSIoTPythonSDK\core\protocol\mqtt_core.py", line 196, in connect
self.connect_async(keep_alive_sec, self._create_blocking_ack_callback(event))
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\site-packages\AWSIoTPythonSDK\core\protocol\mqtt_core.py", line 223, in connect_async
raise e
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\site-packages\AWSIoTPythonSDK\core\protocol\mqtt_core.py", line 211, in connect_async
rc = self._internal_async_client.connect(keep_alive_sec, ack_callback)
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\site-packages\AWSIoTPythonSDK\core\protocol\internal\clients.py", line 122, in connect
rc = self._paho_client.connect(host, port, keep_alive_sec)
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\site-packages\AWSIoTPythonSDK\core\protocol\paho\client.py", line 665, in connect
return self.reconnect()
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\site-packages\AWSIoTPythonSDK\core\protocol\paho\client.py", line 826, in reconnect
ciphers=self._tls_ciphers)
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 1238, in wrap_socket
suppress_ragged_eofs=suppress_ragged_eofs
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 423, in wrap_socket
session=session
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 870, in _create
self.do_handshake()
File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)
How did you generate the certificate and are you correctly linking to the cert you generated?
I have resolved the issue. The endpoints was different aws and boto3 iot service. That's the issue.
⚠️ COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.