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:18:36 +0000 (15:18 +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)

(cherry picked from commit e57120128fa4e2afa4bda5022a77f73a1e3a0b27)

apps/s_server.c

index 15b4b430da762af4efc212596d21ea6bb9d4321c..aa0c9ae681b24ec4ffcc9e6274cee85b56ff38d1 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;