Security policy defined in .json

pull/4155/head
Kari Severinkangas 2017-04-11 15:45:12 +03:00
parent 7d65b0f644
commit e52d3db50e
2 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,7 @@
"thread-master-key": "{0x10, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}",
"thread-config-ml-prefix": "{0xfd, 0x0, 0x0d, 0xb8, 0x0, 0x0, 0x0, 0x0}",
"thread-config-pskc": "{0xc8, 0xa6, 0x2e, 0xae, 0xf3, 0x68, 0xf3, 0x46, 0xa9, 0x9e, 0x57, 0x85, 0x98, 0x9d, 0x1c, 0xd0}",
"thread-device-type": "MESH_DEVICE_TYPE_THREAD_ROUTER"
"thread-device-type": "MESH_DEVICE_TYPE_THREAD_ROUTER",
"thread-security-policy": 255
}
}

View File

@ -232,6 +232,8 @@ void read_link_configuration() {
thread_tasklet_data_ptr->link_config.key_rotation = 3600;
thread_tasklet_data_ptr->link_config.key_sequence = 0;
thread_tasklet_data_ptr->link_config.securityPolicy = MBED_CONF_MBED_MESH_API_THREAD_SECURITY_POLICY;
// network name
MBED_ASSERT(strlen(MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME) > 0 && strlen(MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME) < 17);
memcpy(thread_tasklet_data_ptr->link_config.name, MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME, strlen(MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME));