summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbcook <>2015-07-15 06:16:42 +0000
committerbcook <>2015-07-15 06:16:42 +0000
commit5f53df987283606068383152434ac994e82890e6 (patch)
treefbb9e7dd202b3a83b8d4db7725e3a58451da7850 /src
parente7e3d9ded3adbfe6cefa7ccb4d12e6edd18ff348 (diff)
downloadopenbsd-5f53df987283606068383152434ac994e82890e6.tar.gz
openbsd-5f53df987283606068383152434ac994e82890e6.tar.bz2
openbsd-5f53df987283606068383152434ac994e82890e6.zip
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 'src')
-rw-r--r--src/usr.bin/openssl/pkeyutl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/usr.bin/openssl/pkeyutl.c b/src/usr.bin/openssl/pkeyutl.c
index 0d1284988f..949f1538ef 100644
--- a/src/usr.bin/openssl/pkeyutl.c
+++ b/src/usr.bin/openssl/pkeyutl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkeyutl.c,v 1.4 2014/10/08 04:00:55 deraadt Exp $ */ 1/* $OpenBSD: pkeyutl.c,v 1.5 2015/07/15 06:16:42 bcook Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -278,10 +278,11 @@ pkeyutl_main(int argc, char **argv)
278 if (pkey_op == EVP_PKEY_OP_VERIFY) { 278 if (pkey_op == EVP_PKEY_OP_VERIFY) {
279 rv = EVP_PKEY_verify(ctx, sig, (size_t) siglen, 279 rv = EVP_PKEY_verify(ctx, sig, (size_t) siglen,
280 buf_in, (size_t) buf_inlen); 280 buf_in, (size_t) buf_inlen);
281 if (rv == 0) 281 if (rv == 1) {
282 BIO_puts(out, "Signature Verification Failure\n");
283 else if (rv == 1)
284 BIO_puts(out, "Signature Verified Successfully\n"); 282 BIO_puts(out, "Signature Verified Successfully\n");
283 ret = 0;
284 } else
285 BIO_puts(out, "Signature Verification Failure\n");
285 if (rv >= 0) 286 if (rv >= 0)
286 goto end; 287 goto end;
287 } else { 288 } else {