summaryrefslogtreecommitdiff
path: root/usr.bin/openssl/pkeyutl.c
diff options
context:
space:
mode:
authorBrent Cook <bcook@cvs.openbsd.org>2015-07-15 06:16:43 +0000
committerBrent Cook <bcook@cvs.openbsd.org>2015-07-15 06:16:43 +0000
commit581938c2386d6e20ffffae1c98f0ae589a627a26 (patch)
treec5dcb0482e2926e812a58b4e71904b2aa51340ea /usr.bin/openssl/pkeyutl.c
parent2f7e2b3c47cd40fcc149794a9a160b354612b520 (diff)
Make 'openssl pkeyutl -verify' return exit code 0 on success.
Previously, it returned '1' regardless of whether is succeeded or failed. This is now fixed in the OpenSSL master branch as well. Thanks to Kinichiro Inoguchi for pointing it out. ok @deraadt
Diffstat (limited to 'usr.bin/openssl/pkeyutl.c')
-rw-r--r--usr.bin/openssl/pkeyutl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/openssl/pkeyutl.c b/usr.bin/openssl/pkeyutl.c
index 0d1284988f4..949f1538ef5 100644
--- a/usr.bin/openssl/pkeyutl.c
+++ b/usr.bin/openssl/pkeyutl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkeyutl.c,v 1.4 2014/10/08 04:00:55 deraadt Exp $ */
+/* $OpenBSD: pkeyutl.c,v 1.5 2015/07/15 06:16:42 bcook Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -278,10 +278,11 @@ pkeyutl_main(int argc, char **argv)
if (pkey_op == EVP_PKEY_OP_VERIFY) {
rv = EVP_PKEY_verify(ctx, sig, (size_t) siglen,
buf_in, (size_t) buf_inlen);
- if (rv == 0)
- BIO_puts(out, "Signature Verification Failure\n");
- else if (rv == 1)
+ if (rv == 1) {
BIO_puts(out, "Signature Verified Successfully\n");
+ ret = 0;
+ } else
+ BIO_puts(out, "Signature Verification Failure\n");
if (rv >= 0)
goto end;
} else {