Current behavior:
Currently, the cloud client establishes a connection to the cloud server without verifying if the cloud contains the ID in the certificate's common name.
Expected behavior:
During the TLS handshake, the tls_verify_callback should check if the common name of the certificate contains the cloud ID. The code needs to be modified accordingly.
Note: The cloud will set its own verify callback to verify the cloud ID. All other setup will remain the same as before.
For inspiration, refer to this example.