X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=apps%2Fversion.c;h=041da37e99afb4f3300849434297a13eecf0ba11;hp=0cbcb47f881f4a39700976b9486828f753534766;hb=aff0542844173a9b7fc66b121bdf93316d9e801d;hpb=125cc35b59597c7613cc1a0e8d396e7e86808cb0 diff --git a/apps/version.c b/apps/version.c index 0cbcb47f88..041da37e99 100644 --- a/apps/version.c +++ b/apps/version.c @@ -172,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) @@ -200,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); }