From 49f6cb968ff63793f6671d9026fb2a7034dad79a Mon Sep 17 00:00:00 2001
From: Richard Levitte <levitte@openssl.org>
Date: Wed, 14 Mar 2012 12:39:00 +0000
Subject: [PATCH] cipher should only be set to PSK if JPAKE is used.

---
 apps/s_client.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/apps/s_client.c b/apps/s_client.c
index 20f661ec50..098cce27dd 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -993,14 +993,13 @@ bad:
 			goto end;
 			}
 		psk_identity = "JPAKE";
+		if (cipher)
+			{
+			BIO_printf(bio_err, "JPAKE sets cipher to PSK\n");
+			goto end;
+			}
+		cipher = "PSK";
 		}
-
-	if (cipher)
-		{
-		BIO_printf(bio_err, "JPAKE sets cipher to PSK\n");
-		goto end;
-		}
-	cipher = "PSK";
 #endif
 
 	OpenSSL_add_ssl_algorithms();
-- 
2.25.1