Add cache for EC J-PAKE client extension
Not used yet, just add the variables and cleanup code.
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 6f4703c..c1bccbe 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -4938,6 +4938,10 @@
#endif
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
mbedtls_ecjpake_init( &handshake->ecjpake_ctx );
+#if defined(MBEDTLS_SSL_CLI_C)
+ handshake->ecjpake_cache = NULL;
+ handshake->ecjpake_cache_len = 0;
+#endif
#endif
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
@@ -6625,6 +6629,11 @@
#endif
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
mbedtls_ecjpake_free( &handshake->ecjpake_ctx );
+#if defined(MBEDTLS_SSL_CLI_C)
+ mbedtls_free( handshake->ecjpake_cache );
+ handshake->ecjpake_cache = NULL;
+ handshake->ecjpake_cache_len = 0;
+#endif
#endif
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)