X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=apps%2Fversion.c;h=e9555cbde29da0ebd07d6582c47e2c105a7ca808;hp=6baf679b776497823ca3cfd7b150189c80097db0;hb=92c78463720f71e47c251ffa58493e32cd793e13;hpb=4f94d1a8b18cb35914eb253f75d96fec410694ad diff --git a/apps/version.c b/apps/version.c index 6baf679b77..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 @@ -122,7 +123,7 @@ # include #endif #ifndef OPENSSL_NO_DES -# include +# include #endif #ifndef OPENSSL_NO_IDEA # include @@ -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) @@ -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); }