From 60c0248e0bb642e3d6b43a21e468eaf3d578f29b Mon Sep 17 00:00:00 2001
From: Anthony Foiani <anthony.foiani@gmail.com>
Date: Mon, 12 Aug 2013 08:31:02 -0600
Subject: [PATCH] Return failure exit code for invalid commands.

Invalid commands should not be viewed as a success from a calling
script.

See:

  http://rt.openssl.org/Ticket/Display.html?id=1063

Which is the upstream report for a Debian bug:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150259

Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
---
 apps/openssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/openssl.c b/apps/openssl.c
index 71e1e48..194c745 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -607,7 +607,7 @@ static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[])
 #endif
 			}
 		BIO_printf(bio_err,"\n\n");
-		ret=0;
+		ret=1;
 		}
 end:
 	return(ret);
-- 
1.8.1.4

