SSL Error: SSL PEM lib #276
Labels
guidance
Question that needs advice or information.
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Platform/OS/Hardware/Device: Windows 10
Python Version: 3.7
SSL Version: OpenSSL 1.1.1d 10 Sep 2019
I am trying to connect to AWS IOT using X.509 certificate authentication but I am getting SSL Exception in PEM lib and not able to figure out what's going wrong have done the initialization and configuration as per the documentation.
I am using ats endpoint.
Client Initialization:
myAWSIoTMQTTClient = AWSIoTMQTTClient(CLIENT_ID)
myAWSIoTMQTTClient.configureEndpoint(ENDPOINT, 8883)
myAWSIoTMQTTClient.configureCredentials(PATH_TO_ROOT, PATH_TO_KEY, PATH_TO_CERT)
myAWSIoTMQTTClient.connect()
print("mqtt client connection successful")
Traceback:
in connect_aws_iot_client
myAWSIoTMQTTClient.connect()
File "C:\Users\shivamkukreja\AppData\Local\Programs\Python\Python37\lib\site-packages\AWSIoTPythonSDK\MQTTLib.py", line 355, in connect
return self._mqttCore.connect(keepAliveIntervalSecond)
File "C:\Users\shivamkukreja\AppData\Local\Programs\Python\Python37\lib\site-packages\AWSIoTPythonSDK\core\protocol\mqttCore.py", line 282, in connect
self._pahoClient.connect(self._host, self._port, keepAliveInterval) # Throw exception...
File "C:\Users\shivamkukreja\AppData\Local\Programs\Python\Python37\lib\site-packages\AWSIoTPythonSDK\core\protocol\paho\client.py", line 655, in connect
return self.reconnect()
File "C:\Users\shivamkukreja\AppData\Local\Programs\Python\Python37\lib\site-packages\AWSIoTPythonSDK\core\protocol\paho\client.py", line 798, in reconnect
ciphers=self._tls_ciphers)
File "C:\Users\shivamkukreja\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1232, in wrap_socket
context.load_cert_chain(certfile, keyfile)
Exception: [SSL] PEM lib (_ssl.c:3901)
Please help.
The text was updated successfully, but these errors were encountered: