We are developing an application which needs to consume AWS IoT service based on a MQTT protocol deviation. We are currently facing issues to get connected with MQTT broker provided by AWS IoT cloud server.
Following is the environment:
- iOS Version: 8.0 / 9.0
- Programming language: Swift
- Library for MQTT: Moscapsule
Steps followed:
- Set initial config clientid, host, port
- Set client certificate with private key, providing .pem file path (e.g. cert.pem, privateKey.pem)
- Set server certificate which is root certificate .pem file path (e.g. rootCA.pem)
- Set tls opts with tsl_insecure: false, cert_reqs: SSL_VERIFY_PEER, tls version: tlsv1.2, ciphers: nil
Problems faced:
- When trying to connect to server/broker gives error “unable to create TLS_Context”.
- With setting tls cert_reqs: SSL_VERIFY_NONE, gives connection status success with subcribe and publish sucess, but doesn’t reflect on server or broker.
Any help in this context is highly appreciable.