ecdsa => ec
[openssl.git] / apps / version.c
index 8956b7da9b4dacf4e7d5780c7758c5f3753c042b..435e0b4bb3870b2d09dffd0dc6f1aa62b43bff69 100644 (file)
 #include "apps.h"
 #include <openssl/evp.h>
 #include <openssl/crypto.h>
-#include <openssl/md2.h>
-#include <openssl/rc4.h>
-#include <openssl/des.h>
-#include <openssl/idea.h>
-#include <openssl/blowfish.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
@@ -162,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) 
@@ -176,7 +198,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());