s_client: fix not to send a command letter of R
authorShigeki Ohtsu <ohtsu@ohtsu.org>
Thu, 24 Jan 2019 13:45:50 +0000 (22:45 +0900)
committerMatt Caswell <matt@openssl.org>
Sun, 27 Jan 2019 11:59:15 +0000 (11:59 +0000)
Before 1.1.0, this command letter is not sent to a server.

CLA: trivial
(cherry picked from commit bc180cb4887c2e82111cb714723a94de9f6d2c35)

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8081)

apps/s_client.c

index 9705c4c56eb441d391939103bdf1f16bbb4dbe1e..6e06f15f0fc938b40382b2585ead0395382bb93e 100644 (file)
@@ -3083,9 +3083,7 @@ int s_client_main(int argc, char **argv)
                 BIO_printf(bio_err, "RENEGOTIATING\n");
                 SSL_renegotiate(con);
                 cbuf_len = 0;
-            }
-
-            if (!c_ign_eof && (cbuf[0] == 'K' || cbuf[0] == 'k' )
+           } else if (!c_ign_eof && (cbuf[0] == 'K' || cbuf[0] == 'k' )
                     && cmdletters) {
                 BIO_printf(bio_err, "KEYUPDATE\n");
                 SSL_key_update(con,