0
votes

According to this document, using MQTT on port 443 in AWS IoT requires configuring the ALPN extension with the x-amzn-mqtt-ca protocol.

I use the AWS IoT C++ SDK with OpenSSL. When creating the network::OpenSSLConnection object, I configured the endpoint_port parameter to 443 and enable_alpn to true. Where can I set the protocol to x-amzn-mqtt-ca? The connection seems to work that way, and TCPView shows that it actually uses the HTTPS port.

1

1 Answers

1
votes

Did you try setting the following two protected variables too during network::OpenSSLConnection(..)?

SSL_CTX *p_ssl_context_;  ///< SSL Context instance
SSL     *p_ssl_handle_;   ///< SSL Handle

More info on how to set specific ALPN protocols is on OpenSSL docs @ here.

Hope that helps!