X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=apps%2Fversion.c;h=041da37e99afb4f3300849434297a13eecf0ba11;hb=d979d09cccef0199e5975a640789cb55568d01c9;hp=656b96278b046490d79efe2341c57c3133655f05;hpb=c2e4f17c1a0d4d5115c6ede9492de1615fe392ac;p=openssl.git diff --git a/apps/version.c b/apps/version.c index 656b96278b..041da37e99 100644 --- a/apps/version.c +++ b/apps/version.c @@ -115,11 +115,21 @@ #include "apps.h" #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 @@ -162,7 +172,19 @@ int MAIN(int argc, char **argv) } } - 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 +198,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 +212,5 @@ int MAIN(int argc, char **argv) if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR)); end: apps_shutdown(); - EXIT(ret); + OPENSSL_EXIT(ret); }