From 14e353506a8a255c31b5b6b7520e00ed323d5a13 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 13 Jun 2017 14:28:45 +0100 Subject: Fix no-psk Broken through previous PSK related commits Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3670) --- apps/s_client.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'apps/s_client.c') diff --git a/apps/s_client.c b/apps/s_client.c index f84ae2b4b3..df33e0a596 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -109,10 +109,10 @@ static void do_ssl_shutdown(SSL *ssl) } while (ret < 0); } -#ifndef OPENSSL_NO_PSK /* Default PSK identity and key */ static char *psk_identity = "Client_identity"; +#ifndef OPENSSL_NO_PSK static unsigned int psk_client_cb(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, @@ -570,9 +570,7 @@ typedef enum OPTION_choice { OPT_DEBUG, OPT_TLSEXTDEBUG, OPT_STATUS, OPT_WDEBUG, OPT_MSG, OPT_MSGFILE, OPT_ENGINE, OPT_TRACE, OPT_SECURITY_DEBUG, OPT_SECURITY_DEBUG_VERBOSE, OPT_SHOWCERTS, OPT_NBIO_TEST, OPT_STATE, -#ifndef OPENSSL_NO_PSK OPT_PSK_IDENTITY, OPT_PSK, -#endif OPT_PSK_SESS, #ifndef OPENSSL_NO_SRP OPT_SRPUSER, OPT_SRPPASS, OPT_SRP_STRENGTH, OPT_SRP_LATEUSER, @@ -752,10 +750,8 @@ const OPTIONS s_client_options[] = { {"wdebug", OPT_WDEBUG, '-', "WATT-32 tcp debugging"}, #endif {"nbio", OPT_NBIO, '-', "Use non-blocking IO"}, -#ifndef OPENSSL_NO_PSK {"psk_identity", OPT_PSK_IDENTITY, 's', "PSK identity"}, {"psk", OPT_PSK, 's', "PSK in hex (without 0x)"}, -#endif {"psk_session", OPT_PSK_SESS, '<', "File to read PSK SSL session from"}, #ifndef OPENSSL_NO_SRP {"srpuser", OPT_SRPUSER, 's', "SRP authentication for 'user'"}, @@ -1202,7 +1198,6 @@ int s_client_main(int argc, char **argv) case OPT_STATE: state = 1; break; -#ifndef OPENSSL_NO_PSK case OPT_PSK_IDENTITY: psk_identity = opt_arg(); break; @@ -1214,7 +1209,6 @@ int s_client_main(int argc, char **argv) goto end; } break; -#endif case OPT_PSK_SESS: psksessf = opt_arg(); break; -- cgit v1.2.3