diff options
author | Brent Cook <bcook@cvs.openbsd.org> | 2015-07-15 06:16:43 +0000 |
---|---|---|
committer | Brent Cook <bcook@cvs.openbsd.org> | 2015-07-15 06:16:43 +0000 |
commit | 581938c2386d6e20ffffae1c98f0ae589a627a26 (patch) | |
tree | c5dcb0482e2926e812a58b4e71904b2aa51340ea /usr.bin/openssl/pkeyutl.c | |
parent | 2f7e2b3c47cd40fcc149794a9a160b354612b520 (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.c | 9 |
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 { |