diff options
author | beck <> | 2014-04-13 22:11:45 +0000 |
---|---|---|
committer | beck <> | 2014-04-13 22:11:45 +0000 |
commit | c07bea4706cfb2e50753f5af01364a2dd815689e (patch) | |
tree | 454ebecbf6e32e2986dd1082a857080004b5370c /src | |
parent | 3d8036a72e4d1e91fc354eb6336d3459e1ee7c9c (diff) | |
download | openbsd-c07bea4706cfb2e50753f5af01364a2dd815689e.tar.gz openbsd-c07bea4706cfb2e50753f5af01364a2dd815689e.tar.bz2 openbsd-c07bea4706cfb2e50753f5af01364a2dd815689e.zip |
Remove vms support stuff.
ok deraadt@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/cryptlib.h | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/o_dir_test.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/o_time.c | 144 | ||||
-rw-r--r-- | src/lib/libssl/d1_lib.c | 10 | ||||
-rw-r--r-- | src/lib/libssl/dtls1.h | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/cryptlib.h | 8 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/o_dir_test.c | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/o_time.c | 144 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_lib.c | 10 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/dtls1.h | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/kssl.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/o_dir.c | 10 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl.h | 7 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_cert.c | 5 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/ssltest.c | 16 | ||||
-rw-r--r-- | src/lib/libssl/ssl.h | 7 | ||||
-rw-r--r-- | src/lib/libssl/ssl_cert.c | 5 |
17 files changed, 4 insertions, 386 deletions
diff --git a/src/lib/libcrypto/cryptlib.h b/src/lib/libcrypto/cryptlib.h index d26f9630ea..a99f3d4614 100644 --- a/src/lib/libcrypto/cryptlib.h +++ b/src/lib/libcrypto/cryptlib.h | |||
@@ -79,18 +79,10 @@ | |||
79 | extern "C" { | 79 | extern "C" { |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | #ifndef OPENSSL_SYS_VMS | ||
83 | #define X509_CERT_AREA OPENSSLDIR | 82 | #define X509_CERT_AREA OPENSSLDIR |
84 | #define X509_CERT_DIR OPENSSLDIR "/certs" | 83 | #define X509_CERT_DIR OPENSSLDIR "/certs" |
85 | #define X509_CERT_FILE OPENSSLDIR "/cert.pem" | 84 | #define X509_CERT_FILE OPENSSLDIR "/cert.pem" |
86 | #define X509_PRIVATE_DIR OPENSSLDIR "/private" | 85 | #define X509_PRIVATE_DIR OPENSSLDIR "/private" |
87 | #else | ||
88 | #define X509_CERT_AREA "SSLROOT:[000000]" | ||
89 | #define X509_CERT_DIR "SSLCERTS:" | ||
90 | #define X509_CERT_FILE "SSLCERTS:cert.pem" | ||
91 | #define X509_PRIVATE_DIR "SSLPRIVATE:" | ||
92 | #endif | ||
93 | |||
94 | #define X509_CERT_DIR_EVP "SSL_CERT_DIR" | 86 | #define X509_CERT_DIR_EVP "SSL_CERT_DIR" |
95 | #define X509_CERT_FILE_EVP "SSL_CERT_FILE" | 87 | #define X509_CERT_FILE_EVP "SSL_CERT_FILE" |
96 | 88 | ||
diff --git a/src/lib/libcrypto/o_dir_test.c b/src/lib/libcrypto/o_dir_test.c index 3d75ecb005..238717c110 100644 --- a/src/lib/libcrypto/o_dir_test.c +++ b/src/lib/libcrypto/o_dir_test.c | |||
@@ -39,8 +39,6 @@ | |||
39 | 39 | ||
40 | #if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined OPENSSL_SYS_WINCE | 40 | #if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined OPENSSL_SYS_WINCE |
41 | #define CURRDIR "." | 41 | #define CURRDIR "." |
42 | #elif defined OPENSSL_SYS_VMS | ||
43 | #define CURRDIR "SYS$DISK:[]" | ||
44 | #else | 42 | #else |
45 | #error "No supported platform defined!" | 43 | #error "No supported platform defined!" |
46 | #endif | 44 | #endif |
diff --git a/src/lib/libcrypto/o_time.c b/src/lib/libcrypto/o_time.c index 9030fdef7a..5fb5d4e6d7 100644 --- a/src/lib/libcrypto/o_time.c +++ b/src/lib/libcrypto/o_time.c | |||
@@ -63,21 +63,6 @@ | |||
63 | #include <string.h> | 63 | #include <string.h> |
64 | #include "o_time.h" | 64 | #include "o_time.h" |
65 | 65 | ||
66 | #ifdef OPENSSL_SYS_VMS | ||
67 | # if __CRTL_VER >= 70000000 && \ | ||
68 | (defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE) | ||
69 | # define VMS_GMTIME_OK | ||
70 | # endif | ||
71 | # ifndef VMS_GMTIME_OK | ||
72 | # include <libdtdef.h> | ||
73 | # include <lib$routines.h> | ||
74 | # include <lnmdef.h> | ||
75 | # include <starlet.h> | ||
76 | # include <descrip.h> | ||
77 | # include <stdlib.h> | ||
78 | # endif /* ndef VMS_GMTIME_OK */ | ||
79 | #endif | ||
80 | |||
81 | struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | 66 | struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) |
82 | { | 67 | { |
83 | struct tm *ts = NULL; | 68 | struct tm *ts = NULL; |
@@ -87,7 +72,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | |||
87 | so we don't even look at the return value */ | 72 | so we don't even look at the return value */ |
88 | gmtime_r(timer,result); | 73 | gmtime_r(timer,result); |
89 | ts = result; | 74 | ts = result; |
90 | #elif !defined(OPENSSL_SYS_VMS) || defined(VMS_GMTIME_OK) | 75 | #else |
91 | ts = gmtime(timer); | 76 | ts = gmtime(timer); |
92 | if (ts == NULL) | 77 | if (ts == NULL) |
93 | return NULL; | 78 | return NULL; |
@@ -95,133 +80,6 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | |||
95 | memcpy(result, ts, sizeof(struct tm)); | 80 | memcpy(result, ts, sizeof(struct tm)); |
96 | ts = result; | 81 | ts = result; |
97 | #endif | 82 | #endif |
98 | #if defined( OPENSSL_SYS_VMS) && !defined( VMS_GMTIME_OK) | ||
99 | if (ts == NULL) | ||
100 | { | ||
101 | static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL"); | ||
102 | static $DESCRIPTOR(lognam,"SYS$TIMEZONE_DIFFERENTIAL"); | ||
103 | char logvalue[256]; | ||
104 | unsigned int reslen = 0; | ||
105 | struct { | ||
106 | short buflen; | ||
107 | short code; | ||
108 | void *bufaddr; | ||
109 | unsigned int *reslen; | ||
110 | } itemlist[] = { | ||
111 | { 0, LNM$_STRING, 0, 0 }, | ||
112 | { 0, 0, 0, 0 }, | ||
113 | }; | ||
114 | int status; | ||
115 | time_t t; | ||
116 | |||
117 | /* Get the value for SYS$TIMEZONE_DIFFERENTIAL */ | ||
118 | itemlist[0].buflen = sizeof(logvalue); | ||
119 | itemlist[0].bufaddr = logvalue; | ||
120 | itemlist[0].reslen = &reslen; | ||
121 | status = sys$trnlnm(0, &tabnam, &lognam, 0, itemlist); | ||
122 | if (!(status & 1)) | ||
123 | return NULL; | ||
124 | logvalue[reslen] = '\0'; | ||
125 | |||
126 | t = *timer; | ||
127 | |||
128 | /* The following is extracted from the DEC C header time.h */ | ||
129 | /* | ||
130 | ** Beginning in OpenVMS Version 7.0 mktime, time, ctime, strftime | ||
131 | ** have two implementations. One implementation is provided | ||
132 | ** for compatibility and deals with time in terms of local time, | ||
133 | ** the other __utc_* deals with time in terms of UTC. | ||
134 | */ | ||
135 | /* We use the same conditions as in said time.h to check if we should | ||
136 | assume that t contains local time (and should therefore be adjusted) | ||
137 | or UTC (and should therefore be left untouched). */ | ||
138 | #if __CRTL_VER < 70000000 || defined _VMS_V6_SOURCE | ||
139 | /* Get the numerical value of the equivalence string */ | ||
140 | status = atoi(logvalue); | ||
141 | |||
142 | /* and use it to move time to GMT */ | ||
143 | t -= status; | ||
144 | #endif | ||
145 | |||
146 | /* then convert the result to the time structure */ | ||
147 | |||
148 | /* Since there was no gmtime_r() to do this stuff for us, | ||
149 | we have to do it the hard way. */ | ||
150 | { | ||
151 | /* The VMS epoch is the astronomical Smithsonian date, | ||
152 | if I remember correctly, which is November 17, 1858. | ||
153 | Furthermore, time is measure in thenths of microseconds | ||
154 | and stored in quadwords (64 bit integers). unix_epoch | ||
155 | below is January 1st 1970 expressed as a VMS time. The | ||
156 | following code was used to get this number: | ||
157 | |||
158 | #include <stdio.h> | ||
159 | #include <stdlib.h> | ||
160 | #include <lib$routines.h> | ||
161 | #include <starlet.h> | ||
162 | |||
163 | main() | ||
164 | { | ||
165 | unsigned long systime[2]; | ||
166 | unsigned short epoch_values[7] = | ||
167 | { 1970, 1, 1, 0, 0, 0, 0 }; | ||
168 | |||
169 | lib$cvt_vectim(epoch_values, systime); | ||
170 | |||
171 | printf("%u %u", systime[0], systime[1]); | ||
172 | } | ||
173 | */ | ||
174 | unsigned long unix_epoch[2] = { 1273708544, 8164711 }; | ||
175 | unsigned long deltatime[2]; | ||
176 | unsigned long systime[2]; | ||
177 | struct vms_vectime | ||
178 | { | ||
179 | short year, month, day, hour, minute, second, | ||
180 | centi_second; | ||
181 | } time_values; | ||
182 | long operation; | ||
183 | |||
184 | /* Turn the number of seconds since January 1st 1970 to | ||
185 | an internal delta time. | ||
186 | Note that lib$cvt_to_internal_time() will assume | ||
187 | that t is signed, and will therefore break on 32-bit | ||
188 | systems some time in 2038. | ||
189 | */ | ||
190 | operation = LIB$K_DELTA_SECONDS; | ||
191 | status = lib$cvt_to_internal_time(&operation, | ||
192 | &t, deltatime); | ||
193 | |||
194 | /* Add the delta time with the Unix epoch and we have | ||
195 | the current UTC time in internal format */ | ||
196 | status = lib$add_times(unix_epoch, deltatime, systime); | ||
197 | |||
198 | /* Turn the internal time into a time vector */ | ||
199 | status = sys$numtim(&time_values, systime); | ||
200 | |||
201 | /* Fill in the struct tm with the result */ | ||
202 | result->tm_sec = time_values.second; | ||
203 | result->tm_min = time_values.minute; | ||
204 | result->tm_hour = time_values.hour; | ||
205 | result->tm_mday = time_values.day; | ||
206 | result->tm_mon = time_values.month - 1; | ||
207 | result->tm_year = time_values.year - 1900; | ||
208 | |||
209 | operation = LIB$K_DAY_OF_WEEK; | ||
210 | status = lib$cvt_from_internal_time(&operation, | ||
211 | &result->tm_wday, systime); | ||
212 | result->tm_wday %= 7; | ||
213 | |||
214 | operation = LIB$K_DAY_OF_YEAR; | ||
215 | status = lib$cvt_from_internal_time(&operation, | ||
216 | &result->tm_yday, systime); | ||
217 | result->tm_yday--; | ||
218 | |||
219 | result->tm_isdst = 0; /* There's no way to know... */ | ||
220 | |||
221 | ts = result; | ||
222 | } | ||
223 | } | ||
224 | #endif | ||
225 | return ts; | 83 | return ts; |
226 | } | 84 | } |
227 | 85 | ||
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c index 7565ce7e36..ec0ff40265 100644 --- a/src/lib/libssl/d1_lib.c +++ b/src/lib/libssl/d1_lib.c | |||
@@ -66,10 +66,6 @@ | |||
66 | #include <openssl/objects.h> | 66 | #include <openssl/objects.h> |
67 | #include "ssl_locl.h" | 67 | #include "ssl_locl.h" |
68 | 68 | ||
69 | #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) | ||
70 | #include <sys/timeb.h> | ||
71 | #endif | ||
72 | |||
73 | static void get_current_time(struct timeval *t); | 69 | static void get_current_time(struct timeval *t); |
74 | const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT; | 70 | const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT; |
75 | int dtls1_listen(SSL *s, struct sockaddr *client); | 71 | int dtls1_listen(SSL *s, struct sockaddr *client); |
@@ -462,12 +458,6 @@ static void get_current_time(struct timeval *t) | |||
462 | _ftime(&tb); | 458 | _ftime(&tb); |
463 | t->tv_sec = (long)tb.time; | 459 | t->tv_sec = (long)tb.time; |
464 | t->tv_usec = (long)tb.millitm * 1000; | 460 | t->tv_usec = (long)tb.millitm * 1000; |
465 | #elif defined(OPENSSL_SYS_VMS) | ||
466 | struct timeb tb; | ||
467 | ftime(&tb); | ||
468 | t->tv_sec = (long)tb.time; | ||
469 | t->tv_usec = (long)tb.millitm * 1000; | ||
470 | #else | ||
471 | gettimeofday(t, NULL); | 461 | gettimeofday(t, NULL); |
472 | #endif | 462 | #endif |
473 | } | 463 | } |
diff --git a/src/lib/libssl/dtls1.h b/src/lib/libssl/dtls1.h index e65d501191..aa57e9aec4 100644 --- a/src/lib/libssl/dtls1.h +++ b/src/lib/libssl/dtls1.h | |||
@@ -62,10 +62,6 @@ | |||
62 | 62 | ||
63 | #include <openssl/buffer.h> | 63 | #include <openssl/buffer.h> |
64 | #include <openssl/pqueue.h> | 64 | #include <openssl/pqueue.h> |
65 | #ifdef OPENSSL_SYS_VMS | ||
66 | #include <resource.h> | ||
67 | #include <sys/timeb.h> | ||
68 | #endif | ||
69 | #ifdef OPENSSL_SYS_WIN32 | 65 | #ifdef OPENSSL_SYS_WIN32 |
70 | /* Needed for struct timeval */ | 66 | /* Needed for struct timeval */ |
71 | #include <winsock.h> | 67 | #include <winsock.h> |
diff --git a/src/lib/libssl/src/crypto/cryptlib.h b/src/lib/libssl/src/crypto/cryptlib.h index d26f9630ea..a99f3d4614 100644 --- a/src/lib/libssl/src/crypto/cryptlib.h +++ b/src/lib/libssl/src/crypto/cryptlib.h | |||
@@ -79,18 +79,10 @@ | |||
79 | extern "C" { | 79 | extern "C" { |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | #ifndef OPENSSL_SYS_VMS | ||
83 | #define X509_CERT_AREA OPENSSLDIR | 82 | #define X509_CERT_AREA OPENSSLDIR |
84 | #define X509_CERT_DIR OPENSSLDIR "/certs" | 83 | #define X509_CERT_DIR OPENSSLDIR "/certs" |
85 | #define X509_CERT_FILE OPENSSLDIR "/cert.pem" | 84 | #define X509_CERT_FILE OPENSSLDIR "/cert.pem" |
86 | #define X509_PRIVATE_DIR OPENSSLDIR "/private" | 85 | #define X509_PRIVATE_DIR OPENSSLDIR "/private" |
87 | #else | ||
88 | #define X509_CERT_AREA "SSLROOT:[000000]" | ||
89 | #define X509_CERT_DIR "SSLCERTS:" | ||
90 | #define X509_CERT_FILE "SSLCERTS:cert.pem" | ||
91 | #define X509_PRIVATE_DIR "SSLPRIVATE:" | ||
92 | #endif | ||
93 | |||
94 | #define X509_CERT_DIR_EVP "SSL_CERT_DIR" | 86 | #define X509_CERT_DIR_EVP "SSL_CERT_DIR" |
95 | #define X509_CERT_FILE_EVP "SSL_CERT_FILE" | 87 | #define X509_CERT_FILE_EVP "SSL_CERT_FILE" |
96 | 88 | ||
diff --git a/src/lib/libssl/src/crypto/o_dir_test.c b/src/lib/libssl/src/crypto/o_dir_test.c index 3d75ecb005..238717c110 100644 --- a/src/lib/libssl/src/crypto/o_dir_test.c +++ b/src/lib/libssl/src/crypto/o_dir_test.c | |||
@@ -39,8 +39,6 @@ | |||
39 | 39 | ||
40 | #if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined OPENSSL_SYS_WINCE | 40 | #if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined OPENSSL_SYS_WINCE |
41 | #define CURRDIR "." | 41 | #define CURRDIR "." |
42 | #elif defined OPENSSL_SYS_VMS | ||
43 | #define CURRDIR "SYS$DISK:[]" | ||
44 | #else | 42 | #else |
45 | #error "No supported platform defined!" | 43 | #error "No supported platform defined!" |
46 | #endif | 44 | #endif |
diff --git a/src/lib/libssl/src/crypto/o_time.c b/src/lib/libssl/src/crypto/o_time.c index 9030fdef7a..5fb5d4e6d7 100644 --- a/src/lib/libssl/src/crypto/o_time.c +++ b/src/lib/libssl/src/crypto/o_time.c | |||
@@ -63,21 +63,6 @@ | |||
63 | #include <string.h> | 63 | #include <string.h> |
64 | #include "o_time.h" | 64 | #include "o_time.h" |
65 | 65 | ||
66 | #ifdef OPENSSL_SYS_VMS | ||
67 | # if __CRTL_VER >= 70000000 && \ | ||
68 | (defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE) | ||
69 | # define VMS_GMTIME_OK | ||
70 | # endif | ||
71 | # ifndef VMS_GMTIME_OK | ||
72 | # include <libdtdef.h> | ||
73 | # include <lib$routines.h> | ||
74 | # include <lnmdef.h> | ||
75 | # include <starlet.h> | ||
76 | # include <descrip.h> | ||
77 | # include <stdlib.h> | ||
78 | # endif /* ndef VMS_GMTIME_OK */ | ||
79 | #endif | ||
80 | |||
81 | struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | 66 | struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) |
82 | { | 67 | { |
83 | struct tm *ts = NULL; | 68 | struct tm *ts = NULL; |
@@ -87,7 +72,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | |||
87 | so we don't even look at the return value */ | 72 | so we don't even look at the return value */ |
88 | gmtime_r(timer,result); | 73 | gmtime_r(timer,result); |
89 | ts = result; | 74 | ts = result; |
90 | #elif !defined(OPENSSL_SYS_VMS) || defined(VMS_GMTIME_OK) | 75 | #else |
91 | ts = gmtime(timer); | 76 | ts = gmtime(timer); |
92 | if (ts == NULL) | 77 | if (ts == NULL) |
93 | return NULL; | 78 | return NULL; |
@@ -95,133 +80,6 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) | |||
95 | memcpy(result, ts, sizeof(struct tm)); | 80 | memcpy(result, ts, sizeof(struct tm)); |
96 | ts = result; | 81 | ts = result; |
97 | #endif | 82 | #endif |
98 | #if defined( OPENSSL_SYS_VMS) && !defined( VMS_GMTIME_OK) | ||
99 | if (ts == NULL) | ||
100 | { | ||
101 | static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL"); | ||
102 | static $DESCRIPTOR(lognam,"SYS$TIMEZONE_DIFFERENTIAL"); | ||
103 | char logvalue[256]; | ||
104 | unsigned int reslen = 0; | ||
105 | struct { | ||
106 | short buflen; | ||
107 | short code; | ||
108 | void *bufaddr; | ||
109 | unsigned int *reslen; | ||
110 | } itemlist[] = { | ||
111 | { 0, LNM$_STRING, 0, 0 }, | ||
112 | { 0, 0, 0, 0 }, | ||
113 | }; | ||
114 | int status; | ||
115 | time_t t; | ||
116 | |||
117 | /* Get the value for SYS$TIMEZONE_DIFFERENTIAL */ | ||
118 | itemlist[0].buflen = sizeof(logvalue); | ||
119 | itemlist[0].bufaddr = logvalue; | ||
120 | itemlist[0].reslen = &reslen; | ||
121 | status = sys$trnlnm(0, &tabnam, &lognam, 0, itemlist); | ||
122 | if (!(status & 1)) | ||
123 | return NULL; | ||
124 | logvalue[reslen] = '\0'; | ||
125 | |||
126 | t = *timer; | ||
127 | |||
128 | /* The following is extracted from the DEC C header time.h */ | ||
129 | /* | ||
130 | ** Beginning in OpenVMS Version 7.0 mktime, time, ctime, strftime | ||
131 | ** have two implementations. One implementation is provided | ||
132 | ** for compatibility and deals with time in terms of local time, | ||
133 | ** the other __utc_* deals with time in terms of UTC. | ||
134 | */ | ||
135 | /* We use the same conditions as in said time.h to check if we should | ||
136 | assume that t contains local time (and should therefore be adjusted) | ||
137 | or UTC (and should therefore be left untouched). */ | ||
138 | #if __CRTL_VER < 70000000 || defined _VMS_V6_SOURCE | ||
139 | /* Get the numerical value of the equivalence string */ | ||
140 | status = atoi(logvalue); | ||
141 | |||
142 | /* and use it to move time to GMT */ | ||
143 | t -= status; | ||
144 | #endif | ||
145 | |||
146 | /* then convert the result to the time structure */ | ||
147 | |||
148 | /* Since there was no gmtime_r() to do this stuff for us, | ||
149 | we have to do it the hard way. */ | ||
150 | { | ||
151 | /* The VMS epoch is the astronomical Smithsonian date, | ||
152 | if I remember correctly, which is November 17, 1858. | ||
153 | Furthermore, time is measure in thenths of microseconds | ||
154 | and stored in quadwords (64 bit integers). unix_epoch | ||
155 | below is January 1st 1970 expressed as a VMS time. The | ||
156 | following code was used to get this number: | ||
157 | |||
158 | #include <stdio.h> | ||
159 | #include <stdlib.h> | ||
160 | #include <lib$routines.h> | ||
161 | #include <starlet.h> | ||
162 | |||
163 | main() | ||
164 | { | ||
165 | unsigned long systime[2]; | ||
166 | unsigned short epoch_values[7] = | ||
167 | { 1970, 1, 1, 0, 0, 0, 0 }; | ||
168 | |||
169 | lib$cvt_vectim(epoch_values, systime); | ||
170 | |||
171 | printf("%u %u", systime[0], systime[1]); | ||
172 | } | ||
173 | */ | ||
174 | unsigned long unix_epoch[2] = { 1273708544, 8164711 }; | ||
175 | unsigned long deltatime[2]; | ||
176 | unsigned long systime[2]; | ||
177 | struct vms_vectime | ||
178 | { | ||
179 | short year, month, day, hour, minute, second, | ||
180 | centi_second; | ||
181 | } time_values; | ||
182 | long operation; | ||
183 | |||
184 | /* Turn the number of seconds since January 1st 1970 to | ||
185 | an internal delta time. | ||
186 | Note that lib$cvt_to_internal_time() will assume | ||
187 | that t is signed, and will therefore break on 32-bit | ||
188 | systems some time in 2038. | ||
189 | */ | ||
190 | operation = LIB$K_DELTA_SECONDS; | ||
191 | status = lib$cvt_to_internal_time(&operation, | ||
192 | &t, deltatime); | ||
193 | |||
194 | /* Add the delta time with the Unix epoch and we have | ||
195 | the current UTC time in internal format */ | ||
196 | status = lib$add_times(unix_epoch, deltatime, systime); | ||
197 | |||
198 | /* Turn the internal time into a time vector */ | ||
199 | status = sys$numtim(&time_values, systime); | ||
200 | |||
201 | /* Fill in the struct tm with the result */ | ||
202 | result->tm_sec = time_values.second; | ||
203 | result->tm_min = time_values.minute; | ||
204 | result->tm_hour = time_values.hour; | ||
205 | result->tm_mday = time_values.day; | ||
206 | result->tm_mon = time_values.month - 1; | ||
207 | result->tm_year = time_values.year - 1900; | ||
208 | |||
209 | operation = LIB$K_DAY_OF_WEEK; | ||
210 | status = lib$cvt_from_internal_time(&operation, | ||
211 | &result->tm_wday, systime); | ||
212 | result->tm_wday %= 7; | ||
213 | |||
214 | operation = LIB$K_DAY_OF_YEAR; | ||
215 | status = lib$cvt_from_internal_time(&operation, | ||
216 | &result->tm_yday, systime); | ||
217 | result->tm_yday--; | ||
218 | |||
219 | result->tm_isdst = 0; /* There's no way to know... */ | ||
220 | |||
221 | ts = result; | ||
222 | } | ||
223 | } | ||
224 | #endif | ||
225 | return ts; | 83 | return ts; |
226 | } | 84 | } |
227 | 85 | ||
diff --git a/src/lib/libssl/src/ssl/d1_lib.c b/src/lib/libssl/src/ssl/d1_lib.c index 7565ce7e36..ec0ff40265 100644 --- a/src/lib/libssl/src/ssl/d1_lib.c +++ b/src/lib/libssl/src/ssl/d1_lib.c | |||
@@ -66,10 +66,6 @@ | |||
66 | #include <openssl/objects.h> | 66 | #include <openssl/objects.h> |
67 | #include "ssl_locl.h" | 67 | #include "ssl_locl.h" |
68 | 68 | ||
69 | #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) | ||
70 | #include <sys/timeb.h> | ||
71 | #endif | ||
72 | |||
73 | static void get_current_time(struct timeval *t); | 69 | static void get_current_time(struct timeval *t); |
74 | const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT; | 70 | const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT; |
75 | int dtls1_listen(SSL *s, struct sockaddr *client); | 71 | int dtls1_listen(SSL *s, struct sockaddr *client); |
@@ -462,12 +458,6 @@ static void get_current_time(struct timeval *t) | |||
462 | _ftime(&tb); | 458 | _ftime(&tb); |
463 | t->tv_sec = (long)tb.time; | 459 | t->tv_sec = (long)tb.time; |
464 | t->tv_usec = (long)tb.millitm * 1000; | 460 | t->tv_usec = (long)tb.millitm * 1000; |
465 | #elif defined(OPENSSL_SYS_VMS) | ||
466 | struct timeb tb; | ||
467 | ftime(&tb); | ||
468 | t->tv_sec = (long)tb.time; | ||
469 | t->tv_usec = (long)tb.millitm * 1000; | ||
470 | #else | ||
471 | gettimeofday(t, NULL); | 461 | gettimeofday(t, NULL); |
472 | #endif | 462 | #endif |
473 | } | 463 | } |
diff --git a/src/lib/libssl/src/ssl/dtls1.h b/src/lib/libssl/src/ssl/dtls1.h index e65d501191..aa57e9aec4 100644 --- a/src/lib/libssl/src/ssl/dtls1.h +++ b/src/lib/libssl/src/ssl/dtls1.h | |||
@@ -62,10 +62,6 @@ | |||
62 | 62 | ||
63 | #include <openssl/buffer.h> | 63 | #include <openssl/buffer.h> |
64 | #include <openssl/pqueue.h> | 64 | #include <openssl/pqueue.h> |
65 | #ifdef OPENSSL_SYS_VMS | ||
66 | #include <resource.h> | ||
67 | #include <sys/timeb.h> | ||
68 | #endif | ||
69 | #ifdef OPENSSL_SYS_WIN32 | 65 | #ifdef OPENSSL_SYS_WIN32 |
70 | /* Needed for struct timeval */ | 66 | /* Needed for struct timeval */ |
71 | #include <winsock.h> | 67 | #include <winsock.h> |
diff --git a/src/lib/libssl/src/ssl/kssl.c b/src/lib/libssl/src/ssl/kssl.c index a576c42501..61d7e71d96 100644 --- a/src/lib/libssl/src/ssl/kssl.c +++ b/src/lib/libssl/src/ssl/kssl.c | |||
@@ -2213,9 +2213,5 @@ char *kssl_ctx_get0_client_princ(KSSL_CTX *kctx) | |||
2213 | 2213 | ||
2214 | #else /* !OPENSSL_NO_KRB5 */ | 2214 | #else /* !OPENSSL_NO_KRB5 */ |
2215 | 2215 | ||
2216 | #if defined(PEDANTIC) || defined(OPENSSL_SYS_VMS) | ||
2217 | static void *dummy=&dummy; | ||
2218 | #endif | ||
2219 | |||
2220 | #endif /* !OPENSSL_NO_KRB5 */ | 2216 | #endif /* !OPENSSL_NO_KRB5 */ |
2221 | 2217 | ||
diff --git a/src/lib/libssl/src/ssl/o_dir.c b/src/lib/libssl/src/ssl/o_dir.c index 42891ea459..68bd1f4d04 100644 --- a/src/lib/libssl/src/ssl/o_dir.c +++ b/src/lib/libssl/src/ssl/o_dir.c | |||
@@ -70,14 +70,4 @@ | |||
70 | #include "o_dir.h" | 70 | #include "o_dir.h" |
71 | 71 | ||
72 | #define LPDIR_H | 72 | #define LPDIR_H |
73 | #if defined OPENSSL_SYS_UNIX || defined DJGPP | ||
74 | #include "LPdir_unix.c" | 73 | #include "LPdir_unix.c" |
75 | #elif defined OPENSSL_SYS_VMS | ||
76 | #include "LPdir_vms.c" | ||
77 | #elif defined OPENSSL_SYS_WIN32 | ||
78 | #include "LPdir_win32.c" | ||
79 | #elif defined OPENSSL_SYS_WINCE | ||
80 | #include "LPdir_wince.c" | ||
81 | #else | ||
82 | #include "LPdir_nyi.c" | ||
83 | #endif | ||
diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h index 7219a0e64b..0aec299c7a 100644 --- a/src/lib/libssl/src/ssl/ssl.h +++ b/src/lib/libssl/src/ssl/ssl.h | |||
@@ -1732,13 +1732,8 @@ int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM t | |||
1732 | STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); | 1732 | STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); |
1733 | int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, | 1733 | int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, |
1734 | const char *file); | 1734 | const char *file); |
1735 | #ifndef OPENSSL_SYS_VMS | ||
1736 | #ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */ | ||
1737 | int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, | 1735 | int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, |
1738 | const char *dir); | 1736 | const char *dir); |
1739 | #endif | ||
1740 | #endif | ||
1741 | |||
1742 | #endif | 1737 | #endif |
1743 | 1738 | ||
1744 | void SSL_load_error_strings(void ); | 1739 | void SSL_load_error_strings(void ); |
diff --git a/src/lib/libssl/src/ssl/ssl_cert.c b/src/lib/libssl/src/ssl/ssl_cert.c index 6d144077f9..1aaddc351f 100644 --- a/src/lib/libssl/src/ssl/ssl_cert.c +++ b/src/lib/libssl/src/ssl/ssl_cert.c | |||
@@ -823,12 +823,7 @@ int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, | |||
823 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); | 823 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); |
824 | goto err; | 824 | goto err; |
825 | } | 825 | } |
826 | |||
827 | #ifdef OPENSSL_SYS_VMS | ||
828 | r = BIO_snprintf(buf,sizeof buf,"%s%s",dir,filename); | ||
829 | #else | ||
830 | r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,filename); | 826 | r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,filename); |
831 | #endif | ||
832 | if (r <= 0 || r >= (int)sizeof(buf)) | 827 | if (r <= 0 || r >= (int)sizeof(buf)) |
833 | goto err; | 828 | goto err; |
834 | if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) | 829 | if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) |
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c index 1e285a5c52..00d47974e2 100644 --- a/src/lib/libssl/src/ssl/ssltest.c +++ b/src/lib/libssl/src/ssl/ssltest.c | |||
@@ -158,11 +158,6 @@ | |||
158 | #include <time.h> | 158 | #include <time.h> |
159 | #include <unistd.h> | 159 | #include <unistd.h> |
160 | 160 | ||
161 | #ifdef OPENSSL_SYS_VMS | ||
162 | #define _XOPEN_SOURCE 500 /* Or isascii won't be declared properly on | ||
163 | VMS (at least with DECompHP C). */ | ||
164 | #endif | ||
165 | |||
166 | #include <ctype.h> | 161 | #include <ctype.h> |
167 | 162 | ||
168 | #include <openssl/opensslconf.h> | 163 | #include <openssl/opensslconf.h> |
@@ -204,19 +199,8 @@ | |||
204 | #include OPENSSL_UNISTD | 199 | #include OPENSSL_UNISTD |
205 | #endif | 200 | #endif |
206 | 201 | ||
207 | #ifdef OPENSSL_SYS_VMS | ||
208 | # define TEST_SERVER_CERT "SYS$DISK:[-.APPS]SERVER.PEM" | ||
209 | # define TEST_CLIENT_CERT "SYS$DISK:[-.APPS]CLIENT.PEM" | ||
210 | #elif defined(OPENSSL_SYS_WINCE) | ||
211 | # define TEST_SERVER_CERT "\\OpenSSL\\server.pem" | ||
212 | # define TEST_CLIENT_CERT "\\OpenSSL\\client.pem" | ||
213 | #elif defined(OPENSSL_SYS_NETWARE) | ||
214 | # define TEST_SERVER_CERT "\\openssl\\apps\\server.pem" | ||
215 | # define TEST_CLIENT_CERT "\\openssl\\apps\\client.pem" | ||
216 | #else | ||
217 | # define TEST_SERVER_CERT "../apps/server.pem" | 202 | # define TEST_SERVER_CERT "../apps/server.pem" |
218 | # define TEST_CLIENT_CERT "../apps/client.pem" | 203 | # define TEST_CLIENT_CERT "../apps/client.pem" |
219 | #endif | ||
220 | 204 | ||
221 | /* There is really no standard for this, so let's assign some tentative | 205 | /* There is really no standard for this, so let's assign some tentative |
222 | numbers. In any case, these numbers are only for this test */ | 206 | numbers. In any case, these numbers are only for this test */ |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 7219a0e64b..0aec299c7a 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1732,13 +1732,8 @@ int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM t | |||
1732 | STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); | 1732 | STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); |
1733 | int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, | 1733 | int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, |
1734 | const char *file); | 1734 | const char *file); |
1735 | #ifndef OPENSSL_SYS_VMS | ||
1736 | #ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */ | ||
1737 | int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, | 1735 | int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, |
1738 | const char *dir); | 1736 | const char *dir); |
1739 | #endif | ||
1740 | #endif | ||
1741 | |||
1742 | #endif | 1737 | #endif |
1743 | 1738 | ||
1744 | void SSL_load_error_strings(void ); | 1739 | void SSL_load_error_strings(void ); |
diff --git a/src/lib/libssl/ssl_cert.c b/src/lib/libssl/ssl_cert.c index 6d144077f9..1aaddc351f 100644 --- a/src/lib/libssl/ssl_cert.c +++ b/src/lib/libssl/ssl_cert.c | |||
@@ -823,12 +823,7 @@ int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, | |||
823 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); | 823 | SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); |
824 | goto err; | 824 | goto err; |
825 | } | 825 | } |
826 | |||
827 | #ifdef OPENSSL_SYS_VMS | ||
828 | r = BIO_snprintf(buf,sizeof buf,"%s%s",dir,filename); | ||
829 | #else | ||
830 | r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,filename); | 826 | r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,filename); |
831 | #endif | ||
832 | if (r <= 0 || r >= (int)sizeof(buf)) | 827 | if (r <= 0 || r >= (int)sizeof(buf)) |
833 | goto err; | 828 | goto err; |
834 | if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) | 829 | if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) |