peer_cn was added in the shadow demo program in sdk3.7.0 that was not in the 3.52 example.
conninfo.peer_cn = (uint8_t*) "*.iot.us-east-1.amazonaws.com";
The program seems to work fine if this is set to NULL or the above value.
What is this used for and why should I need it?
CN is short for common name, it is used in TLS connections. It allows for a certificate to be used for multiple URLs with a common hostname. For example, it should allow user1hub.iot.us-east-1.amazonaws.com to use the same certificate as user2hub.iot.us-east-1.amazonaws.com for connection.