remove psk key when ephemeral selected
ephemeral is selected, `handshake->psk` must be removed.
Otherwise the encrypt key will be caculate fail.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/ssl_misc.h b/library/ssl_misc.h
index e76086a..33a6533 100644
--- a/library/ssl_misc.h
+++ b/library/ssl_misc.h
@@ -2498,6 +2498,13 @@
int mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext(
mbedtls_ssl_context *ssl,
unsigned char *buf, unsigned char *end );
+
+/**
+ * \brief Remove psk from handshake context
+ *
+ * \param[in] ssl SSL context
+ */
+void mbedtls_ssl_remove_psk( mbedtls_ssl_context *ssl );
#endif /* MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED */
#endif /* ssl_misc.h */