Blame SOURCES/openssl-0.9.8j-version-add-engines.patch

a5ef24
diff -up openssl-0.9.8j/apps/version.c.version-add-engines openssl-0.9.8j/apps/version.c
a5ef24
--- openssl-0.9.8j/apps/version.c.version-add-engines	2008-10-20 14:53:33.000000000 +0200
a5ef24
+++ openssl-0.9.8j/apps/version.c	2009-01-13 23:22:03.000000000 +0100
a5ef24
@@ -131,6 +131,7 @@
a5ef24
 #ifndef OPENSSL_NO_BF
a5ef24
 # include <openssl/blowfish.h>
a5ef24
 #endif
a5ef24
+#include <openssl/engine.h>
a5ef24
 
a5ef24
 #undef PROG
a5ef24
 #define PROG	version_main
a5ef24
@@ -140,7 +141,7 @@ int MAIN(int, char **);
a5ef24
 int MAIN(int argc, char **argv)
a5ef24
 	{
a5ef24
 	int i,ret=0;
a5ef24
-	int cflags=0,version=0,date=0,options=0,platform=0,dir=0;
a5ef24
+	int cflags=0,version=0,date=0,options=0,platform=0,dir=0,engines=0;
a5ef24
 
a5ef24
 	apps_startup();
a5ef24
 
a5ef24
@@ -164,7 +165,7 @@ int MAIN(int argc, char **argv)
a5ef24
 		else if (strcmp(argv[i],"-d") == 0)
a5ef24
 			dir=1;
a5ef24
 		else if (strcmp(argv[i],"-a") == 0)
a5ef24
-			date=version=cflags=options=platform=dir=1;
a5ef24
+			date=version=cflags=options=platform=dir=engines=1;
a5ef24
 		else
a5ef24
 			{
a5ef24
 			BIO_printf(bio_err,"usage:version -[avbofpd]\n");
a5ef24
@@ -211,6 +212,18 @@ int MAIN(int argc, char **argv)
a5ef24
 		}
a5ef24
 	if (cflags)  printf("%s\n",SSLeay_version(SSLEAY_CFLAGS));
a5ef24
 	if (dir)  printf("%s\n",SSLeay_version(SSLEAY_DIR));
a5ef24
+	if (engines)
a5ef24
+		{
a5ef24
+		ENGINE *e;
a5ef24
+		printf("engines:  ");
a5ef24
+		e = ENGINE_get_first();
a5ef24
+		while (e)
a5ef24
+			{
a5ef24
+			printf("%s ", ENGINE_get_id(e));
a5ef24
+			e = ENGINE_get_next(e);
a5ef24
+			}
a5ef24
+		printf("\n");
a5ef24
+		}
a5ef24
 end:
a5ef24
 	apps_shutdown();
a5ef24
 	OPENSSL_EXIT(ret);