summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2014-04-13 22:11:45 +0000
committerbeck <beck@openbsd.org>2014-04-13 22:11:45 +0000
commitf2467ce67c6a1b6f67bbc726b9e832ed6050bcae (patch)
tree9c961d2b1ca6a6e251b6c3d98a319721e2ff8d62 /lib/libssl/src
parentUnify description handling across all document types (mdoc, man, cat). (diff)
downloadwireguard-openbsd-f2467ce67c6a1b6f67bbc726b9e832ed6050bcae.tar.xz
wireguard-openbsd-f2467ce67c6a1b6f67bbc726b9e832ed6050bcae.zip
Remove vms support stuff.
ok deraadt@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/cryptlib.h8
-rw-r--r--lib/libssl/src/crypto/o_dir_test.c2
-rw-r--r--lib/libssl/src/crypto/o_time.c144
-rw-r--r--lib/libssl/src/ssl/d1_lib.c10
-rw-r--r--lib/libssl/src/ssl/dtls1.h4
-rw-r--r--lib/libssl/src/ssl/kssl.c4
-rw-r--r--lib/libssl/src/ssl/o_dir.c10
-rw-r--r--lib/libssl/src/ssl/ssl.h7
-rw-r--r--lib/libssl/src/ssl/ssl_cert.c5
-rw-r--r--lib/libssl/src/ssl/ssltest.c16
10 files changed, 2 insertions, 208 deletions
diff --git a/lib/libssl/src/crypto/cryptlib.h b/lib/libssl/src/crypto/cryptlib.h
index d26f9630ead..a99f3d46148 100644
--- a/lib/libssl/src/crypto/cryptlib.h
+++ b/lib/libssl/src/crypto/cryptlib.h
@@ -79,18 +79,10 @@
extern "C" {
#endif
-#ifndef OPENSSL_SYS_VMS
#define X509_CERT_AREA OPENSSLDIR
#define X509_CERT_DIR OPENSSLDIR "/certs"
#define X509_CERT_FILE OPENSSLDIR "/cert.pem"
#define X509_PRIVATE_DIR OPENSSLDIR "/private"
-#else
-#define X509_CERT_AREA "SSLROOT:[000000]"
-#define X509_CERT_DIR "SSLCERTS:"
-#define X509_CERT_FILE "SSLCERTS:cert.pem"
-#define X509_PRIVATE_DIR "SSLPRIVATE:"
-#endif
-
#define X509_CERT_DIR_EVP "SSL_CERT_DIR"
#define X509_CERT_FILE_EVP "SSL_CERT_FILE"
diff --git a/lib/libssl/src/crypto/o_dir_test.c b/lib/libssl/src/crypto/o_dir_test.c
index 3d75ecb0050..238717c1108 100644
--- a/lib/libssl/src/crypto/o_dir_test.c
+++ b/lib/libssl/src/crypto/o_dir_test.c
@@ -39,8 +39,6 @@
#if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined OPENSSL_SYS_WINCE
#define CURRDIR "."
-#elif defined OPENSSL_SYS_VMS
-#define CURRDIR "SYS$DISK:[]"
#else
#error "No supported platform defined!"
#endif
diff --git a/lib/libssl/src/crypto/o_time.c b/lib/libssl/src/crypto/o_time.c
index 9030fdef7ae..5fb5d4e6d7a 100644
--- a/lib/libssl/src/crypto/o_time.c
+++ b/lib/libssl/src/crypto/o_time.c
@@ -63,21 +63,6 @@
#include <string.h>
#include "o_time.h"
-#ifdef OPENSSL_SYS_VMS
-# if __CRTL_VER >= 70000000 && \
- (defined _POSIX_C_SOURCE || !defined _ANSI_C_SOURCE)
-# define VMS_GMTIME_OK
-# endif
-# ifndef VMS_GMTIME_OK
-# include <libdtdef.h>
-# include <lib$routines.h>
-# include <lnmdef.h>
-# include <starlet.h>
-# include <descrip.h>
-# include <stdlib.h>
-# endif /* ndef VMS_GMTIME_OK */
-#endif
-
struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
{
struct tm *ts = NULL;
@@ -87,7 +72,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
so we don't even look at the return value */
gmtime_r(timer,result);
ts = result;
-#elif !defined(OPENSSL_SYS_VMS) || defined(VMS_GMTIME_OK)
+#else
ts = gmtime(timer);
if (ts == NULL)
return NULL;
@@ -95,133 +80,6 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
memcpy(result, ts, sizeof(struct tm));
ts = result;
#endif
-#if defined( OPENSSL_SYS_VMS) && !defined( VMS_GMTIME_OK)
- if (ts == NULL)
- {
- static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL");
- static $DESCRIPTOR(lognam,"SYS$TIMEZONE_DIFFERENTIAL");
- char logvalue[256];
- unsigned int reslen = 0;
- struct {
- short buflen;
- short code;
- void *bufaddr;
- unsigned int *reslen;
- } itemlist[] = {
- { 0, LNM$_STRING, 0, 0 },
- { 0, 0, 0, 0 },
- };
- int status;
- time_t t;
-
- /* Get the value for SYS$TIMEZONE_DIFFERENTIAL */
- itemlist[0].buflen = sizeof(logvalue);
- itemlist[0].bufaddr = logvalue;
- itemlist[0].reslen = &reslen;
- status = sys$trnlnm(0, &tabnam, &lognam, 0, itemlist);
- if (!(status & 1))
- return NULL;
- logvalue[reslen] = '\0';
-
- t = *timer;
-
-/* The following is extracted from the DEC C header time.h */
-/*
-** Beginning in OpenVMS Version 7.0 mktime, time, ctime, strftime
-** have two implementations. One implementation is provided
-** for compatibility and deals with time in terms of local time,
-** the other __utc_* deals with time in terms of UTC.
-*/
-/* We use the same conditions as in said time.h to check if we should
- assume that t contains local time (and should therefore be adjusted)
- or UTC (and should therefore be left untouched). */
-#if __CRTL_VER < 70000000 || defined _VMS_V6_SOURCE
- /* Get the numerical value of the equivalence string */
- status = atoi(logvalue);
-
- /* and use it to move time to GMT */
- t -= status;
-#endif
-
- /* then convert the result to the time structure */
-
- /* Since there was no gmtime_r() to do this stuff for us,
- we have to do it the hard way. */
- {
- /* The VMS epoch is the astronomical Smithsonian date,
- if I remember correctly, which is November 17, 1858.
- Furthermore, time is measure in thenths of microseconds
- and stored in quadwords (64 bit integers). unix_epoch
- below is January 1st 1970 expressed as a VMS time. The
- following code was used to get this number:
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <lib$routines.h>
- #include <starlet.h>
-
- main()
- {
- unsigned long systime[2];
- unsigned short epoch_values[7] =
- { 1970, 1, 1, 0, 0, 0, 0 };
-
- lib$cvt_vectim(epoch_values, systime);
-
- printf("%u %u", systime[0], systime[1]);
- }
- */
- unsigned long unix_epoch[2] = { 1273708544, 8164711 };
- unsigned long deltatime[2];
- unsigned long systime[2];
- struct vms_vectime
- {
- short year, month, day, hour, minute, second,
- centi_second;
- } time_values;
- long operation;
-
- /* Turn the number of seconds since January 1st 1970 to
- an internal delta time.
- Note that lib$cvt_to_internal_time() will assume
- that t is signed, and will therefore break on 32-bit
- systems some time in 2038.
- */
- operation = LIB$K_DELTA_SECONDS;
- status = lib$cvt_to_internal_time(&operation,
- &t, deltatime);
-
- /* Add the delta time with the Unix epoch and we have
- the current UTC time in internal format */
- status = lib$add_times(unix_epoch, deltatime, systime);
-
- /* Turn the internal time into a time vector */
- status = sys$numtim(&time_values, systime);
-
- /* Fill in the struct tm with the result */
- result->tm_sec = time_values.second;
- result->tm_min = time_values.minute;
- result->tm_hour = time_values.hour;
- result->tm_mday = time_values.day;
- result->tm_mon = time_values.month - 1;
- result->tm_year = time_values.year - 1900;
-
- operation = LIB$K_DAY_OF_WEEK;
- status = lib$cvt_from_internal_time(&operation,
- &result->tm_wday, systime);
- result->tm_wday %= 7;
-
- operation = LIB$K_DAY_OF_YEAR;
- status = lib$cvt_from_internal_time(&operation,
- &result->tm_yday, systime);
- result->tm_yday--;
-
- result->tm_isdst = 0; /* There's no way to know... */
-
- ts = result;
- }
- }
-#endif
return ts;
}
diff --git a/lib/libssl/src/ssl/d1_lib.c b/lib/libssl/src/ssl/d1_lib.c
index 7565ce7e366..ec0ff402654 100644
--- a/lib/libssl/src/ssl/d1_lib.c
+++ b/lib/libssl/src/ssl/d1_lib.c
@@ -66,10 +66,6 @@
#include <openssl/objects.h>
#include "ssl_locl.h"
-#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS)
-#include <sys/timeb.h>
-#endif
-
static void get_current_time(struct timeval *t);
const char dtls1_version_str[]="DTLSv1" OPENSSL_VERSION_PTEXT;
int dtls1_listen(SSL *s, struct sockaddr *client);
@@ -462,12 +458,6 @@ static void get_current_time(struct timeval *t)
_ftime(&tb);
t->tv_sec = (long)tb.time;
t->tv_usec = (long)tb.millitm * 1000;
-#elif defined(OPENSSL_SYS_VMS)
- struct timeb tb;
- ftime(&tb);
- t->tv_sec = (long)tb.time;
- t->tv_usec = (long)tb.millitm * 1000;
-#else
gettimeofday(t, NULL);
#endif
}
diff --git a/lib/libssl/src/ssl/dtls1.h b/lib/libssl/src/ssl/dtls1.h
index e65d5011915..aa57e9aec42 100644
--- a/lib/libssl/src/ssl/dtls1.h
+++ b/lib/libssl/src/ssl/dtls1.h
@@ -62,10 +62,6 @@
#include <openssl/buffer.h>
#include <openssl/pqueue.h>
-#ifdef OPENSSL_SYS_VMS
-#include <resource.h>
-#include <sys/timeb.h>
-#endif
#ifdef OPENSSL_SYS_WIN32
/* Needed for struct timeval */
#include <winsock.h>
diff --git a/lib/libssl/src/ssl/kssl.c b/lib/libssl/src/ssl/kssl.c
index a576c425015..61d7e71d967 100644
--- a/lib/libssl/src/ssl/kssl.c
+++ b/lib/libssl/src/ssl/kssl.c
@@ -2213,9 +2213,5 @@ char *kssl_ctx_get0_client_princ(KSSL_CTX *kctx)
#else /* !OPENSSL_NO_KRB5 */
-#if defined(PEDANTIC) || defined(OPENSSL_SYS_VMS)
-static void *dummy=&dummy;
-#endif
-
#endif /* !OPENSSL_NO_KRB5 */
diff --git a/lib/libssl/src/ssl/o_dir.c b/lib/libssl/src/ssl/o_dir.c
index 42891ea4592..68bd1f4d04b 100644
--- a/lib/libssl/src/ssl/o_dir.c
+++ b/lib/libssl/src/ssl/o_dir.c
@@ -70,14 +70,4 @@
#include "o_dir.h"
#define LPDIR_H
-#if defined OPENSSL_SYS_UNIX || defined DJGPP
#include "LPdir_unix.c"
-#elif defined OPENSSL_SYS_VMS
-#include "LPdir_vms.c"
-#elif defined OPENSSL_SYS_WIN32
-#include "LPdir_win32.c"
-#elif defined OPENSSL_SYS_WINCE
-#include "LPdir_wince.c"
-#else
-#include "LPdir_nyi.c"
-#endif
diff --git a/lib/libssl/src/ssl/ssl.h b/lib/libssl/src/ssl/ssl.h
index 7219a0e64bc..0aec299c7a0 100644
--- a/lib/libssl/src/ssl/ssl.h
+++ b/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
STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
const char *file);
-#ifndef OPENSSL_SYS_VMS
-#ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */
int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
- const char *dir);
-#endif
-#endif
-
+ const char *dir);
#endif
void SSL_load_error_strings(void );
diff --git a/lib/libssl/src/ssl/ssl_cert.c b/lib/libssl/src/ssl/ssl_cert.c
index 6d144077f9f..1aaddc351f8 100644
--- a/lib/libssl/src/ssl/ssl_cert.c
+++ b/lib/libssl/src/ssl/ssl_cert.c
@@ -823,12 +823,7 @@ int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG);
goto err;
}
-
-#ifdef OPENSSL_SYS_VMS
- r = BIO_snprintf(buf,sizeof buf,"%s%s",dir,filename);
-#else
r = BIO_snprintf(buf,sizeof buf,"%s/%s",dir,filename);
-#endif
if (r <= 0 || r >= (int)sizeof(buf))
goto err;
if(!SSL_add_file_cert_subjects_to_stack(stack,buf))
diff --git a/lib/libssl/src/ssl/ssltest.c b/lib/libssl/src/ssl/ssltest.c
index 1e285a5c52d..00d47974e2a 100644
--- a/lib/libssl/src/ssl/ssltest.c
+++ b/lib/libssl/src/ssl/ssltest.c
@@ -158,11 +158,6 @@
#include <time.h>
#include <unistd.h>
-#ifdef OPENSSL_SYS_VMS
-#define _XOPEN_SOURCE 500 /* Or isascii won't be declared properly on
- VMS (at least with DECompHP C). */
-#endif
-
#include <ctype.h>
#include <openssl/opensslconf.h>
@@ -204,19 +199,8 @@
#include OPENSSL_UNISTD
#endif
-#ifdef OPENSSL_SYS_VMS
-# define TEST_SERVER_CERT "SYS$DISK:[-.APPS]SERVER.PEM"
-# define TEST_CLIENT_CERT "SYS$DISK:[-.APPS]CLIENT.PEM"
-#elif defined(OPENSSL_SYS_WINCE)
-# define TEST_SERVER_CERT "\\OpenSSL\\server.pem"
-# define TEST_CLIENT_CERT "\\OpenSSL\\client.pem"
-#elif defined(OPENSSL_SYS_NETWARE)
-# define TEST_SERVER_CERT "\\openssl\\apps\\server.pem"
-# define TEST_CLIENT_CERT "\\openssl\\apps\\client.pem"
-#else
# define TEST_SERVER_CERT "../apps/server.pem"
# define TEST_CLIENT_CERT "../apps/client.pem"
-#endif
/* There is really no standard for this, so let's assign some tentative
numbers. In any case, these numbers are only for this test */