Merge pull request #13608 from mikaleppanen/cert_remove

Add certificate remove before add to Wisun tasklet
pull/13612/head
Martin Kojtal 2020-09-14 12:22:38 +01:00 committed by GitHub
commit 12a64906b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -290,6 +290,7 @@ static void wisun_tasklet_configure_and_connect_to_network(void)
#else
trusted_cert.cert_len = strlen((const char *) MBED_CONF_MBED_MESH_API_ROOT_CERTIFICATE) + 1;
#endif
arm_network_trusted_certificates_remove();
arm_network_trusted_certificate_add((const arm_certificate_entry_s *)&trusted_cert);
arm_certificate_entry_s own_cert = {
@ -308,6 +309,7 @@ static void wisun_tasklet_configure_and_connect_to_network(void)
#else
own_cert.key_len = strlen((const char *) MBED_CONF_MBED_MESH_API_OWN_CERTIFICATE_KEY) + 1;
#endif
arm_network_own_certificates_remove();
arm_network_own_certificate_add((const arm_certificate_entry_s *)&own_cert);
#endif