conninfo.peer_cn added in sdk 3.7.0 shadow demo - what is it for?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
joMa_1809706
Level 4
Level 4
10 likes received First like received First like given

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?

0 Likes
1 Reply
AndrewY_86
Employee
Employee
25 sign-ins 25 replies posted 10 replies posted

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.