X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=apps%2Fversion.c;h=69ef3e1bad077ac866b8bb63bc4937edd66da8da;hb=08a638237d61382efe507dc27c34289d9605a964;hp=6baf679b776497823ca3cfd7b150189c80097db0;hpb=4f94d1a8b18cb35914eb253f75d96fec410694ad;p=openssl.git diff --git a/apps/version.c b/apps/version.c index 6baf679b77..69ef3e1bad 100644 --- a/apps/version.c +++ b/apps/version.c @@ -115,6 +115,7 @@ #include "apps.h" #include #include +#include #ifndef OPENSSL_NO_MD2 # include #endif @@ -122,7 +123,7 @@ # include #endif #ifndef OPENSSL_NO_DES -# include +# include #endif #ifndef OPENSSL_NO_IDEA # include @@ -172,7 +173,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) @@ -186,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()); @@ -200,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); }