Fix error message for s_server -psk option
authorweinholtendian <45032224+weinholtendian@users.noreply.github.com>
Thu, 31 Jan 2019 07:16:20 +0000 (15:16 +0800)
committerPaul Yang <yang.yang@baishancloud.com>
Thu, 31 Jan 2019 07:17:09 +0000 (15:17 +0800)
Previously if -psk was given a bad key it would print "Not a hex
number 's_server'".

CLA: Trivial

Reviewed-by: Paul Yang <yang.yang@baishancloud.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/8113)

apps/s_server.c

index 364f76b3f0842623b8436eb11bff0961fb20f499..8565a3aab31bd66760b7a60f9d55323436ef0cad 100644 (file)
@@ -1407,7 +1407,7 @@ int s_server_main(int argc, char *argv[])
             for (p = psk_key = opt_arg(); *p; p++) {
                 if (isxdigit(_UC(*p)))
                     continue;
-                BIO_printf(bio_err, "Not a hex number '%s'\n", *argv);
+                BIO_printf(bio_err, "Not a hex number '%s'\n", psk_key);
                 goto end;
             }
             break;