From: Richard Levitte Date: Sun, 11 Aug 2002 21:48:44 +0000 (+0000) Subject: In case of shared libraries, we might run one version of the X-Git-Tag: OpenSSL_0_9_7-beta4~203^2~15 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4fde69b066a848c0a8408d1f4c3ce7a55decd432;p=oweals%2Fopenssl.git In case of shared libraries, we might run one version of the application with a different version of the library. Detect if there is a difference of versions, and print both versions in that case. This might prove to be a good enough debugging tool in case of doubt. --- diff --git a/apps/version.c b/apps/version.c index 0cbcb47f88..a9fda99e0c 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", + SSLEAY_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)