diff options
author | Richard Levitte <levitte@openssl.org> | 2002-08-11 21:48:44 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-08-11 21:48:44 +0000 |
commit | 4fde69b066a848c0a8408d1f4c3ce7a55decd432 (patch) | |
tree | c8dd2fbd23dfe46d4fa59ff7a7b4867d5b8c672e | |
parent | fd9a4dbe94d3c1eade4c7b738c8a28559d010e1b (diff) | |
download | openssl-4fde69b066a848c0a8408d1f4c3ce7a55decd432.tar.gz |
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.
-rw-r--r-- | apps/version.c | 14 |
1 files changed, 13 insertions, 1 deletions
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) |