pkeyutl exit with 0 if the verification succeeded
authorjunfx <junfx@users.noreply.github.com>
Thu, 13 Apr 2017 07:56:50 +0000 (15:56 +0800)
committerRichard Levitte <levitte@openssl.org>
Thu, 13 Apr 2017 11:25:54 +0000 (13:25 +0200)
If exiting non-zero, which not consistent with shell conventions,
the shells/scripts treat the cmd as failed.

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3213)

apps/pkeyutl.c

index 7c62d1c8709bcf71c357c32fadd274b731ddd35e..19f2e5d9cf9fd1fde38987243a472a9bfe73774b 100644 (file)
@@ -322,8 +322,10 @@ int MAIN(int argc, char **argv)
                              buf_in, (size_t)buf_inlen);
         if (rv == 0)
             BIO_puts(out, "Signature Verification Failure\n");
-        else if (rv == 1)
+        else if (rv == 1) {
             BIO_puts(out, "Signature Verified Successfully\n");
+            ret = 0;
+        }
         if (rv >= 0)
             goto end;
     } else {