cipher should only be set to PSK if JPAKE is used. OpenSSL_1_0_1
authorRichard Levitte <levitte@openssl.org>
Wed, 14 Mar 2012 12:39:00 +0000 (12:39 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 14 Mar 2012 12:39:00 +0000 (12:39 +0000)
apps/s_client.c

index 20f661ec5010a20592de7b7a8119745225d62f87..098cce27ddb766052bf1d6250fbba604aee685ee 100644 (file)
@@ -993,14 +993,13 @@ bad:
                        goto end;
                        }
                psk_identity = "JPAKE";
                        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();
 #endif
 
        OpenSSL_add_ssl_algorithms();