X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fversion.c;h=e9555cbde29da0ebd07d6582c47e2c105a7ca808;hp=0cbcb47f881f4a39700976b9486828f753534766;hb=e02614417d41380c7ccc612375352aac2fab079c;hpb=125cc35b59597c7613cc1a0e8d396e7e86808cb0 diff --git a/apps/version.c b/apps/version.c index 0cbcb47f88..e9555cbde2 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 @@ -166,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) @@ -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); }