esp_tls: enable psk verification mode, added mqtt example using psk authentication

This commit is contained in:
David Cermak
2019-05-23 21:48:08 +02:00
committed by Angus Gratton
parent d260ee6955
commit f3d6a34e7d
13 changed files with 309 additions and 2 deletions

View File

@@ -169,6 +169,14 @@ void esp_transport_ssl_enable_global_ca_store(esp_transport_handle_t t)
}
}
void esp_transport_ssl_set_psk_key_hint(esp_transport_handle_t t, const psk_hint_key_t* psk_hint_key)
{
transport_ssl_t *ssl = esp_transport_get_context_data(t);
if (t && ssl) {
ssl->cfg.psk_hint_key = psk_hint_key;
}
}
void esp_transport_ssl_set_cert_data(esp_transport_handle_t t, const char *data, int len)
{
transport_ssl_t *ssl = esp_transport_get_context_data(t);