summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cversion.c
diff options
context:
space:
mode:
authormarkus <>2002-09-05 12:51:50 +0000
committermarkus <>2002-09-05 12:51:50 +0000
commit15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch)
treebf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/cversion.c
parent027351f729b9e837200dae6e1520cda6577ab930 (diff)
downloadopenbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz
openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2
openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/cversion.c')
-rw-r--r--src/lib/libcrypto/cversion.c45
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
65char *SSLeay_version(t) 64#include "buildinf.h"
66int t; 65
66const 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
95unsigned long SSLeay() 114unsigned long SSLeay(void)
96 { 115 {
97 return(SSLEAY_VERSION_NUMBER); 116 return(SSLEAY_VERSION_NUMBER);
98 } 117 }