projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update FAQ
[openssl.git]
/
apps
/
version.c
diff --git
a/apps/version.c
b/apps/version.c
index 656b96278b046490d79efe2341c57c3133655f05..e9555cbde29da0ebd07d6582c47e2c105a7ca808 100644
(file)
--- a/
apps/version.c
+++ b/
apps/version.c
@@
-115,11
+115,22
@@
#include "apps.h"
#include <openssl/evp.h>
#include <openssl/crypto.h>
#include "apps.h"
#include <openssl/evp.h>
#include <openssl/crypto.h>
-#include <openssl/md2.h>
-#include <openssl/rc4.h>
-#include <openssl/des_old.h>
-#include <openssl/idea.h>
-#include <openssl/blowfish.h>
+#include <openssl/bn.h>
+#ifndef OPENSSL_NO_MD2
+# include <openssl/md2.h>
+#endif
+#ifndef OPENSSL_NO_RC4
+# include <openssl/rc4.h>
+#endif
+#ifndef OPENSSL_NO_DES
+# include <openssl/des.h>
+#endif
+#ifndef OPENSSL_NO_IDEA
+# include <openssl/idea.h>
+#endif
+#ifndef OPENSSL_NO_BF
+# include <openssl/blowfish.h>
+#endif
#undef PROG
#define PROG version_main
#undef PROG
#define PROG version_main
@@
-156,13
+167,25
@@
int MAIN(int argc, char **argv)
date=version=cflags=options=platform=dir=1;
else
{
date=version=cflags=options=platform=dir=1;
else
{
- BIO_printf(bio_err,"usage:version -[avbofp]\n");
+ BIO_printf(bio_err,"usage:version -[avbofp
d
]\n");
ret=1;
goto end;
}
}
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)
if (date) printf("%s\n",SSLeay_version(SSLEAY_BUILT_ON));
if (platform) printf("%s\n",SSLeay_version(SSLEAY_PLATFORM));
if (options)
@@
-176,7
+199,7
@@
int MAIN(int argc, char **argv)
printf("%s ",RC4_options());
#endif
#ifndef OPENSSL_NO_DES
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());
#endif
#ifndef OPENSSL_NO_IDEA
printf("%s ",idea_options());
@@
-190,5
+213,5
@@
int MAIN(int argc, char **argv)
if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR));
end:
apps_shutdown();
if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR));
end:
apps_shutdown();
- EXIT(ret);
+
OPENSSL_
EXIT(ret);
}
}