TLS handshake is failing with the following error: The SSL certificate of the peer is not trusted.
After I changed the value from QAPI_NET_SSL_CA_LIST_E to QAPI_NET_SSL_DI_CERT_E in the following APIs, the SSL handshake was OK.
May I check, what is the difference between the 2 params?
QAPI_NET_SSL_CA_LIST_E refers to the intermediate certificate that links to Root CA on the device.
QAPI_NET_SSL_DI_CERT_E is similar to self-signed root certificate.