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
commite9032a3c566e9cec4858cc0ef7226c51772d9137 (patch)
treefbb9e7dd202b3a83b8d4db7725e3a58451da7850 /src
parent1ebb0dacd1449decc4c4b82b4383e5a6f4ea7d7b (diff)
downloadopenbsd-e9032a3c566e9cec4858cc0ef7226c51772d9137.tar.gz
openbsd-e9032a3c566e9cec4858cc0ef7226c51772d9137.tar.bz2
openbsd-e9032a3c566e9cec4858cc0ef7226c51772d9137.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 {