fix various issues
- wrong typo in comments
- replace psk null check with key_exchange_mode check
- set psk NULL when error return in export hs psk
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index d26fcc8..d0193e4 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -1860,9 +1860,9 @@
opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ALL;
else if( strcmp( q, "all" ) == 0 )
opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_ALL;
- /* `psk_or_ephemeral` exists in theory and is not recommend in practise.
+ /* `psk_or_ephemeral` exists in theory and is not recommended in practice.
* In server side, if needed extensions are received, psk or ephemeral
- * mode will be set. Add this mode only for test purpose to improve
+ * mode will be set. Add this mode only for test purposes to improve
* test coverage.
*/
else if( strcmp( q, "psk_or_ephemeral" ) == 0 )