I am building an MQTT client on a PIC32. I can connect to my Mosquitto broker and transfer encrypted data. If I then close that session and attempt to start a new session, I get the following error: [../MbedTLS/library/ssl_tls13_generic.c] [1602][1] psa_export_public_key() returned -32512 (-0x7f00) which is MBEDTLS_ERR_SSL_ALLOC_FAILED.
When closing the session, I set net_ctx.fd = NULL (it is a SOCKET *) then call the following:
mbedtls_x509_crt_free(&(tls->ca_crt));|
mbedtls_ssl_free(&(tls->ssl_ctx));|
mbedtls_ssl_config_free(&(tls->ssl_conf));|
mbedtls_ctr_drbg_free(&(tls->ctr_drbg));|
mbedtls_entropy_free(&(tls->entropy));|
Any suggestions please?
Am I missing something in the shutdown?
Do I have to get memory_buffer_alloc.c going? I don’t have fprintf() but I can work around that.
Thanks.
Regards,
Les Grant.