X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=apps%2Fversion.c;h=e9555cbde29da0ebd07d6582c47e2c105a7ca808;hb=e02614417d41380c7ccc612375352aac2fab079c;hp=656b96278b046490d79efe2341c57c3133655f05;hpb=c2e4f17c1a0d4d5115c6ede9492de1615fe392ac;p=openssl.git diff --git a/apps/version.c b/apps/version.c index 656b96278b..e9555cbde2 100644 --- a/apps/version.c +++ b/apps/version.c @@ -115,11 +115,22 @@ #include "apps.h" #include #include -#include -#include -#include -#include -#include +#include +#ifndef OPENSSL_NO_MD2 +# include +#endif +#ifndef OPENSSL_NO_RC4 +# include +#endif +#ifndef OPENSSL_NO_DES +# include +#endif +#ifndef OPENSSL_NO_IDEA +# include +#endif +#ifndef OPENSSL_NO_BF +# include +#endif #undef PROG #define PROG version_main @@ -156,13 +167,25 @@ int MAIN(int argc, char **argv) date=version=cflags=options=platform=dir=1; else { - BIO_printf(bio_err,"usage:version -[avbofp]\n"); + BIO_printf(bio_err,"usage:version -[avbofpd]\n"); ret=1; goto end; } } - if (version) printf("%s\n",SSLeay_version(SSLEAY_VERSION)); + if (version) + { + if (SSLeay() == SSLEAY_VERSION_NUMBER) + { + printf("%s\n",SSLeay_version(SSLEAY_VERSION)); + } + else + { + printf("%s (Library: %s)\n", + OPENSSL_VERSION_TEXT, + SSLeay_version(SSLEAY_VERSION)); + } + } if (date) printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON)); if (platform) printf("%s\n",SSLeay_version(SSLEAY_PLATFORM)); if (options) @@ -176,7 +199,7 @@ int MAIN(int argc, char **argv) printf("%s ",RC4_options()); #endif #ifndef OPENSSL_NO_DES - printf("%s ",des_options()); + printf("%s ",DES_options()); #endif #ifndef OPENSSL_NO_IDEA printf("%s ",idea_options()); @@ -190,5 +213,5 @@ int MAIN(int argc, char **argv) if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR)); end: apps_shutdown(); - EXIT(ret); + OPENSSL_EXIT(ret); }