MQTT Client unable to load certificates

We are trying to connect to AWS IoT Core and have added required certificates to resources folder and refering the same in MQTT subscribe java action but its not working as expected.   When tried from another client the setup works as expected.    Please find the logs below.   java.lang.NullPointerException: null     at mqttclient.impl.SslUtil.getSslSocketFactory(     at mqttclient.impl.MqttConnector$MqttConnection.<init>(     at mqttclient.impl.MqttConnector.getMqttConnection(     at mqttclient.impl.MqttConnector.subscribe(     at mqttclient.actions.MqttSubscribe.executeAction(     at mqttclient.actions.MqttSubscribe.executeAction(
1 answers

You need to

  1. Open your certificates file in any text editor.
  2. Copy all content of the file and paste it to the CA Certificate and Client Certificate fields. Certificates start with -----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----. Client keys typically start with -----BEGIN RSA PRIVATE KEY----- or -----BEGIN PKCS7-----.
  3. Add the Client Certificate Key and the Certificate password if one was set.
    • Currently supported certificate types are X.509 format (.crt.cer)
    • Currently supported key types are X.509 format (.pem.pkcs)