MQTT with both TLS hostname checking and public/private certificates on nrf9160 with TLS offloaded to modem

I'm working towards getting an app derived from MQTT Simple to talk to AWS where I both need to validate the hostname via TLS, and also use public/private certificates to authenticate to the AWS server.

MQTT Simple was hard-coded to use a single security tag but I need separate host root certificates and private credentials (AWS recommends six different possible root certificates plus my device-specific credentials).  For testing, I whittled this down to two - a root certificate and a public/private key pair.

I modified the MQTT tls_config to accept a list of security tags and created two security items - one that is the hostname root certificate MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN, and a second containing the device credentials (TYPE_PRIVATE_CERT, TYPE_PUBLIC_CERT).  The root cert has been validated by using the HTTPS example program, and I've tested all three using mosquito commands on a Linux host.

When I call mqtt_connect() and follow the call chain to the bottom of the pile, I find my thread hung waiting for nrf_socket_offload_connect() to return (see attached image of call stack).

What can I do to debug this?  (I can privately share the code or certs if necessary - the set I have are for a dedicated test host which will only exist until I have this working)

Parents Reply Children
No Data
Related