diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/cversion.c | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/src/lib/libcrypto/cversion.c b/src/lib/libcrypto/cversion.c index 4e823be52f..8ecfba7b16 100644 --- a/src/lib/libcrypto/cversion.c +++ b/src/lib/libcrypto/cversion.c | |||
| @@ -59,40 +59,59 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <string.h> | 60 | #include <string.h> |
| 61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 62 | #include "crypto.h" | 62 | #include <openssl/crypto.h> |
| 63 | #include "date.h" | ||
| 64 | 63 | ||
| 65 | char *SSLeay_version(t) | 64 | #include "buildinf.h" |
| 66 | int t; | 65 | |
| 66 | const char *SSLeay_version(int t) | ||
| 67 | { | 67 | { |
| 68 | if (t == SSLEAY_VERSION) | 68 | if (t == SSLEAY_VERSION) |
| 69 | return("SSLeay 0.9.0b 29-Jun-1998"); | 69 | return OPENSSL_VERSION_TEXT; |
| 70 | if (t == SSLEAY_BUILT_ON) | 70 | if (t == SSLEAY_BUILT_ON) |
| 71 | { | 71 | { |
| 72 | #ifdef DATE | 72 | #ifdef DATE |
| 73 | static char buf[sizeof(DATE)+10]; | 73 | static char buf[sizeof(DATE)+11]; |
| 74 | 74 | ||
| 75 | sprintf(buf,"built on %s",DATE); | 75 | sprintf(buf,"built on: %s",DATE); |
| 76 | return(buf); | 76 | return(buf); |
| 77 | #else | 77 | #else |
| 78 | return("build date not available"); | 78 | return("built on: date not available"); |
| 79 | #endif | 79 | #endif |
| 80 | } | 80 | } |
| 81 | if (t == SSLEAY_CFLAGS) | 81 | if (t == SSLEAY_CFLAGS) |
| 82 | { | 82 | { |
| 83 | #ifdef CFLAGS | 83 | #ifdef CFLAGS |
| 84 | static char buf[sizeof(CFLAGS)+10]; | 84 | static char buf[sizeof(CFLAGS)+11]; |
| 85 | |||
| 86 | sprintf(buf,"compiler: %s",CFLAGS); | ||
| 87 | return(buf); | ||
| 88 | #else | ||
| 89 | return("compiler: information not available"); | ||
| 90 | #endif | ||
| 91 | } | ||
| 92 | if (t == SSLEAY_PLATFORM) | ||
| 93 | { | ||
| 94 | #ifdef PLATFORM | ||
| 95 | static char buf[sizeof(PLATFORM)+11]; | ||
| 85 | 96 | ||
| 86 | sprintf(buf,"C flags:%s",CFLAGS); | 97 | sprintf(buf,"platform: %s", PLATFORM); |
| 87 | return(buf); | 98 | return(buf); |
| 88 | #else | 99 | #else |
| 89 | return("C flags not available"); | 100 | return("platform: information not available"); |
| 101 | #endif | ||
| 102 | } | ||
| 103 | if (t == SSLEAY_DIR) | ||
| 104 | { | ||
| 105 | #ifdef OPENSSLDIR | ||
| 106 | return "OPENSSLDIR: \"" OPENSSLDIR "\""; | ||
| 107 | #else | ||
| 108 | return "OPENSSLDIR: N/A"; | ||
| 90 | #endif | 109 | #endif |
| 91 | } | 110 | } |
| 92 | return("not available"); | 111 | return("not available"); |
| 93 | } | 112 | } |
| 94 | 113 | ||
| 95 | unsigned long SSLeay() | 114 | unsigned long SSLeay(void) |
| 96 | { | 115 | { |
| 97 | return(SSLEAY_VERSION_NUMBER); | 116 | return(SSLEAY_VERSION_NUMBER); |
| 98 | } | 117 | } |
