]>
Commit | Line | Data |
---|---|---|
68d15d21 MT |
1 | diff -up openssl-0.9.8j/apps/version.c.version-add-engines openssl-0.9.8j/apps/version.c |
2 | --- openssl-0.9.8j/apps/version.c.version-add-engines 2008-10-20 14:53:33.000000000 +0200 | |
3 | +++ openssl-0.9.8j/apps/version.c 2009-01-13 23:22:03.000000000 +0100 | |
4 | @@ -131,6 +131,7 @@ | |
5 | #ifndef OPENSSL_NO_BF | |
6 | # include <openssl/blowfish.h> | |
7 | #endif | |
8 | +#include <openssl/engine.h> | |
9 | ||
10 | #undef PROG | |
11 | #define PROG version_main | |
12 | @@ -140,7 +141,7 @@ int MAIN(int, char **); | |
13 | int MAIN(int argc, char **argv) | |
14 | { | |
15 | int i,ret=0; | |
16 | - int cflags=0,version=0,date=0,options=0,platform=0,dir=0; | |
17 | + int cflags=0,version=0,date=0,options=0,platform=0,dir=0,engines=0; | |
18 | ||
19 | apps_startup(); | |
20 | ||
21 | @@ -164,7 +165,7 @@ int MAIN(int argc, char **argv) | |
22 | else if (strcmp(argv[i],"-d") == 0) | |
23 | dir=1; | |
24 | else if (strcmp(argv[i],"-a") == 0) | |
25 | - date=version=cflags=options=platform=dir=1; | |
26 | + date=version=cflags=options=platform=dir=engines=1; | |
27 | else | |
28 | { | |
29 | BIO_printf(bio_err,"usage:version -[avbofpd]\n"); | |
30 | @@ -211,6 +212,18 @@ int MAIN(int argc, char **argv) | |
31 | } | |
32 | if (cflags) printf("%s\n",SSLeay_version(SSLEAY_CFLAGS)); | |
33 | if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR)); | |
34 | + if (engines) | |
35 | + { | |
36 | + ENGINE *e; | |
37 | + printf("engines: "); | |
38 | + e = ENGINE_get_first(); | |
39 | + while (e) | |
40 | + { | |
41 | + printf("%s ", ENGINE_get_id(e)); | |
42 | + e = ENGINE_get_next(e); | |
43 | + } | |
44 | + printf("\n"); | |
45 | + } | |
46 | end: | |
47 | apps_shutdown(); | |
48 | OPENSSL_EXIT(ret); |