Hi,
Here's more fuel for the OpenSSL fire. Mostly just axeing at ifdefs,
trying to err on the conservitive side.
There's obviously *TONS* more to clean up, but I only had so much time
tonight. :)
BTW, libssl and libcrypto don't currently build because their Makefiles
still include some recently-killed files, and usr.sbin/openssl won't
build because of at least CRYPTO_malloc & friends, and probably other
reasons.
Index: apps/apps.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/apps/apps.c,v
retrieving revision 1.26
diff -u -p -r1.26 apps.c
--- apps/apps.c 16 Apr 2014 16:34:09 -0000 1.26
+++ apps/apps.c 17 Apr 2014 07:09:45 -0000
@@ -112,9 +112,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if !defined(OPENSSL_SYSNAME_WIN32) && !defined(NETWARE_CLIB)
#include <strings.h>
-#endif
#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
@@ -141,11 +139,6 @@
#include "apps.h"
#undef NON_MAIN
-#ifdef _WIN32
-static int WIN32_rename(const char *from, const char *to);
-#define rename(from,to) WIN32_rename((from),(to))
-#endif
-
typedef struct {
const char *name;
unsigned long flag;
@@ -287,44 +280,6 @@ str2fmt(char *s)
return (FORMAT_UNDEF);
}
-#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN32) ||
defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_NETWARE)
-void
-program_name(char *in, char *out, int size)
-{
- int i, n;
- char *p = NULL;
-
- n = strlen(in);
- /* find the last '/', '\' or ':' */
- for (i = n - 1; i > 0; i--) {
- if ((in[i] == '/') || (in[i] == '\\') || (in[i] == ':')) {
- p = &(in[i + 1]);
- break;
- }
- }
- if (p == NULL)
- p = in;
- n = strlen(p);
-
- /* strip off trailing .exe if present. */
- if ((n > 4) && (p[n - 4] == '.') &&
- ((p[n - 3] == 'e') || (p[n - 3] == 'E')) &&
- ((p[n - 2] == 'x') || (p[n - 2] == 'X')) &&
- ((p[n - 1] == 'e') || (p[n - 1] == 'E')))
- n -= 4;
-
- if (n > size - 1)
- n = size - 1;
-
- for (i = 0; i < n; i++) {
- if ((p[i] >= 'A') && (p[i] <= 'Z'))
- out[i] = p[i] - 'A' + 'a';
- else
- out[i] = p[i];
- }
- out[n] = '\0';
-}
-#else
void
program_name(char *in, char *out, int size)
{
@@ -337,7 +292,6 @@ program_name(char *in, char *out, int si
p = in;
BUF_strlcpy(out, p, size);
}
-#endif
int
chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
@@ -635,15 +589,6 @@ app_get_pass(BIO *err, char *arg, int ke
BIO_printf(err, "Can't open file %s\n", arg +
5);
return NULL;
}
-#if !defined(_WIN32)
- /*
- * Under _WIN32, which covers even Win64 and CE, file
- * descriptors referenced by BIO_s_fd are not inherited
- * by child process and therefore below is not an option.
- * It could have been an option if bss_fd.c was operating
- * on real Windows descriptors, such as those obtained
- * with CreateFile.
- */
} else if (!strncmp(arg, "fd:", 3)) {
BIO *btmp;
i = atoi(arg + 3);
@@ -656,7 +601,6 @@ app_get_pass(BIO *err, char *arg, int ke
/* Can't do BIO_gets on an fd BIO so add a buffering
BIO */
btmp = BIO_new(BIO_f_buffer());
pwdbio = BIO_push(btmp, pwdbio);
-#endif
} else if (!strcmp(arg, "stdin")) {
pwdbio = BIO_new_fp(stdin, BIO_NOCLOSE);
if (!pwdbio) {
@@ -2600,196 +2544,8 @@ next_protos_parse(unsigned short *outlen
}
#endif /* !OPENSSL_NO_TLSEXT && !OPENSSL_NO_NEXTPROTONEG */
-/*
- * Platform-specific sections
- */
-#if defined(_WIN32)
-# ifdef fileno
-# undef fileno
-# define fileno(a) (int)_fileno(a)
-# endif
-
-# include <windows.h>
-# include <tchar.h>
-
-static int
-WIN32_rename(const char *from, const char *to)
-{
- TCHAR *tfrom = NULL, *tto;
- DWORD err;
- int ret = 0;
-
- if (sizeof(TCHAR) == 1) {
- tfrom = (TCHAR *)from;
- tto = (TCHAR *)to;
- }
- else /* UNICODE path */
- {
- size_t i, flen = strlen(from) + 1, tlen = strlen(to) + 1;
- tfrom = (TCHAR *)malloc(sizeof(TCHAR)*(flen + tlen));
- if (tfrom == NULL)
- goto err;
- tto = tfrom + flen;
-#if !defined(_WIN32_WCE) || _WIN32_WCE>=101
- if (!MultiByteToWideChar(CP_ACP, 0, from, flen, (WCHAR *)tfrom,
flen))
-#endif
- for (i = 0;i < flen;i++) tfrom[i] = (TCHAR)from[i];
-#if !defined(_WIN32_WCE) || _WIN32_WCE>=101
- if (!MultiByteToWideChar(CP_ACP, 0, to, tlen, (WCHAR *)tto,
tlen))
-#endif
- for (i = 0;i < tlen;i++) tto[i] = (TCHAR)to[i];
- }
-
- if (MoveFile(tfrom, tto))
- goto ok;
- err = GetLastError();
- if (err == ERROR_ALREADY_EXISTS || err == ERROR_FILE_EXISTS) {
- if (DeleteFile(tto) && MoveFile(tfrom, tto))
- goto ok;
- err = GetLastError();
- }
- if (err == ERROR_FILE_NOT_FOUND || err == ERROR_PATH_NOT_FOUND)
- errno = ENOENT;
- else if (err == ERROR_ACCESS_DENIED)
- errno = EACCES;
- else
- errno = EINVAL; /* we could map more codes... */
-err:
- ret = -1;
-ok:
- if (tfrom != NULL && tfrom != (TCHAR *)from)
- free(tfrom);
- return ret;
-}
-#endif
-
/* app_tminterval section */
-#if defined(_WIN32)
-double
-app_tminterval(int stop, int usertime)
-{
- FILETIME now;
- double ret = 0;
- static ULARGE_INTEGER tmstart;
- static int warning = 1;
-#ifdef _WIN32_WINNT
- static HANDLE proc = NULL;
-
- if (proc == NULL) {
- if (check_winnt())
- proc = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE,
- GetCurrentProcessId());
- if (proc == NULL)
- proc = (HANDLE) - 1;
- }
-
- if (usertime && proc != (HANDLE) - 1) {
- FILETIME junk;
- GetProcessTimes(proc, &junk, &junk, &junk, &now);
- } else
-#endif
- {
- SYSTEMTIME systime;
-
- if (usertime && warning) {
- BIO_printf(bio_err, "To get meaningful results, run "
- "this program on idle system.\n");
- warning = 0;
- }
- GetSystemTime(&systime);
- SystemTimeToFileTime(&systime, &now);
- }
-
- if (stop == TM_START) {
- tmstart.u.LowPart = now.dwLowDateTime;
- tmstart.u.HighPart = now.dwHighDateTime;
- } else {
- ULARGE_INTEGER tmstop;
-
- tmstop.u.LowPart = now.dwLowDateTime;
- tmstop.u.HighPart = now.dwHighDateTime;
-
- ret = (__int64)(tmstop.QuadPart - tmstart.QuadPart)*1e - 7;
- }
-
- return (ret);
-}
-
-#elif defined(OPENSSL_SYSTEM_VXWORKS)
-#include <time.h>
-
-double
-app_tminterval(int stop, int usertime)
-{
- double ret = 0;
-#ifdef CLOCK_REALTIME
- static struct timespec tmstart;
- struct timespec now;
-#else
- static unsigned long tmstart;
- unsigned long now;
-#endif
- static int warning = 1;
-
- if (usertime && warning) {
- BIO_printf(bio_err, "To get meaningful results, run "
- "this program on idle system.\n");
- warning = 0;
- }
-
-#ifdef CLOCK_REALTIME
- clock_gettime(CLOCK_REALTIME, &now);
- if (stop == TM_START)
- tmstart = now;
- else ret = ( (now.tv_sec + now.tv_nsec*1e - 9)
- - (tmstart.tv_sec + tmstart.tv_nsec*1e - 9) );
-#else
- now = tickGet();
- if (stop == TM_START)
- tmstart = now;
- else
- ret = (now - tmstart)/(double)sysClkRateGet();
-#endif
- return (ret);
-}
-
-#elif defined(OPENSSL_SYSTEM_VMS)
-#include <time.h>
-#include <times.h>
-
-double
-app_tminterval(int stop, int usertime)
-{
- static clock_t tmstart;
- double ret = 0;
- clock_t now;
-#ifdef __TMS
- struct tms rus;
-
- now = times(&rus);
- if (usertime)
- now = rus.tms_utime;
-#else
- if (usertime)
- now = clock(); /* sum of user and kernel times */
- else {
- struct timeval tv;
- gettimeofday(&tv, NULL);
- now = (clock_t)(
- (unsigned long long)tv.tv_sec*CLK_TCK +
- (unsigned long long)tv.tv_usec*(1000000/CLK_TCK)
- );
- }
-#endif
- if (stop == TM_START)
- tmstart = now;
- else
- ret = (now - tmstart)/(double)(CLK_TCK);
-
- return (ret);
-}
-
-#elif defined(_SC_CLK_TCK) /* by means of unistd.h */
+#if defined(_SC_CLK_TCK) /* by means of unistd.h */
#include <sys/times.h>
double
@@ -2841,34 +2597,6 @@ app_tminterval(int stop, int usertime)
#endif
/* app_isdir section */
-#ifdef _WIN32
-int
-app_isdir(const char *name)
-{
- HANDLE hList;
- WIN32_FIND_DATA FileData;
-#if defined(UNICODE) || defined(_UNICODE)
- size_t i, len_0 = strlen(name) + 1;
-
- if (len_0 > sizeof(FileData.cFileName)/sizeof(FileData.cFileName[0]))
- return -1;
-
-#if !defined(_WIN32_WCE) || _WIN32_WCE>=101
- if (!MultiByteToWideChar(CP_ACP, 0, name, len_0, FileData.cFileName,
len_0))
-#endif
- for (i = 0; i < len_0; i++)
- FileData.cFileName[i] = (WCHAR)name[i];
-
- hList = FindFirstFile(FileData.cFileName, &FileData);
-#else
- hList = FindFirstFile(name, &FileData);
-#endif
- if (hList == INVALID_HANDLE_VALUE)
- return -1;
- FindClose(hList);
- return ((FileData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) != 0);
-}
-#else
#include <sys/stat.h>
#ifndef S_ISDIR
# if defined(_S_IFMT) && defined(_S_IFDIR)
@@ -2892,41 +2620,16 @@ app_isdir(const char *name)
return -1;
#endif
}
-#endif
/* raw_read|write section */
-#if defined(_WIN32) && defined(STD_INPUT_HANDLE)
-int
-raw_read_stdin(void *buf, int siz)
-{
- DWORD n;
- if (ReadFile(GetStdHandle(STD_INPUT_HANDLE), buf, siz, &n, NULL))
- return (n);
- else
- return (-1);
-}
-#else
int
raw_read_stdin(void *buf, int siz)
{
return read(fileno(stdin), buf, siz);
}
-#endif
-#if defined(_WIN32) && defined(STD_OUTPUT_HANDLE)
-int
-raw_write_stdout(const void *buf, int siz)
-{
- DWORD n;
- if (WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), buf, siz, &n, NULL))
- return (n);
- else
- return (-1);
-}
-#else
int
raw_write_stdout(const void *buf, int siz)
{
return write(fileno(stdout), buf, siz);
}
-#endif
Index: apps/apps.h
===================================================================
RCS file: /cvs/src/lib/libssl/src/apps/apps.h,v
retrieving revision 1.17
diff -u -p -r1.17 apps.h
--- apps/apps.h 16 Apr 2014 15:57:43 -0000 1.17
+++ apps/apps.h 17 Apr 2014 07:09:45 -0000
@@ -158,15 +158,9 @@ extern BIO *bio_err;
#endif
-#ifndef OPENSSL_SYS_NETWARE
#include <signal.h>
-#endif
-#ifdef SIGPIPE
#define do_pipe_sig() signal(SIGPIPE,SIG_IGN)
-#else
-#define do_pipe_sig()
-#endif
#ifdef OPENSSL_NO_COMP
#define zlib_cleanup()
@@ -204,12 +198,7 @@ extern BIO *bio_err;
# endif
#endif
-#ifdef OPENSSL_SYSNAME_WIN32
-# define openssl_fdset(a,b) FD_SET((unsigned int)a, b)
-#else
-# define openssl_fdset(a,b) FD_SET(a, b)
-#endif
-
+#define openssl_fdset(a,b) FD_SET(a, b)
typedef struct args_st {
char **data;
Index: apps/s_apps.h
===================================================================
RCS file: /cvs/src/lib/libssl/src/apps/s_apps.h,v
retrieving revision 1.11
diff -u -p -r1.11 s_apps.h
--- apps/s_apps.h 16 Apr 2014 02:14:27 -0000 1.11
+++ apps/s_apps.h 17 Apr 2014 07:09:45 -0000
@@ -108,18 +108,8 @@
* Hudson ([email protected]).
*
*/
-#if !defined(OPENSSL_SYS_NETWARE) /* conflicts with winsock2 stuff on netware
*/
#include <sys/types.h>
-#endif
#include <openssl/opensslconf.h>
-
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
-#include <conio.h>
-#endif
-
-#if defined(OPENSSL_SYS_MSDOS) && !defined(_WIN32)
-#define _kbhit kbhit
-#endif
#define PORT 4433
#define PORT_STR "4433"
Index: apps/s_client.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/apps/s_client.c,v
retrieving revision 1.34
diff -u -p -r1.34 s_client.c
--- apps/s_client.c 16 Apr 2014 02:51:01 -0000 1.34
+++ apps/s_client.c 17 Apr 2014 07:09:45 -0000
@@ -143,9 +143,6 @@
#include <stdlib.h>
#include <string.h>
#include <openssl/e_os2.h>
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
#define USE_SOCKETS
#include "apps.h"
@@ -166,8 +163,6 @@
#undef PROG
#define PROG s_client_main
-/*#define SSL_HOST_NAME "www.netscape.com" */
-/*#define SSL_HOST_NAME "193.118.187.102" */
#define SSL_HOST_NAME "localhost"
/*#define TEST_CERT "client.pem" */ /* no default cert. */
@@ -293,9 +288,6 @@ static void sc_usage(void)
BIO_printf(bio_err," -pause - sleep(1) after each read(2) and
write(2) system call\n");
BIO_printf(bio_err," -showcerts - show all certificates in the
chain\n");
BIO_printf(bio_err," -debug - extra output\n");
-#ifdef WATT32
- BIO_printf(bio_err," -wdebug - WATT-32 tcp debugging\n");
-#endif
BIO_printf(bio_err," -msg - Show protocol messages\n");
BIO_printf(bio_err," -nbio_test - more ssl protocol testing\n");
BIO_printf(bio_err," -state - print the 'ssl' states\n");
@@ -586,9 +578,6 @@ int MAIN(int argc, char **argv)
ENGINE *ssl_client_engine=NULL;
#endif
ENGINE *e=NULL;
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) ||
defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS_R5)
- struct timeval tv;
-#endif
#ifndef OPENSSL_NO_TLSEXT
char *servername = NULL;
tlsextctx tlsextcbp =
@@ -721,10 +710,6 @@ int MAIN(int argc, char **argv)
else if (strcmp(*argv,"-status") == 0)
c_status_req=1;
#endif
-#ifdef WATT32
- else if (strcmp(*argv,"-wdebug") == 0)
- dbug_init();
-#endif
else if (strcmp(*argv,"-msg") == 0)
c_msg=1;
else if (strcmp(*argv,"-showcerts") == 0)
@@ -1550,7 +1535,6 @@ SSL_set_tlsext_status_ids(con, ids);
if (!ssl_pending)
{
-#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) &&
!defined(OPENSSL_SYS_NETWARE) && !defined (OPENSSL_SYS_BEOS_R5)
if (tty_on)
{
if (read_tty)
openssl_fdset(fileno(stdin),&readfds);
@@ -1560,50 +1544,8 @@ SSL_set_tlsext_status_ids(con, ids);
openssl_fdset(SSL_get_fd(con),&readfds);
if (write_ssl)
openssl_fdset(SSL_get_fd(con),&writefds);
-#else
- if(!tty_on || !write_tty) {
- if (read_ssl)
- openssl_fdset(SSL_get_fd(con),&readfds);
- if (write_ssl)
-
openssl_fdset(SSL_get_fd(con),&writefds);
- }
-#endif
-/* printf("mode tty(%d %d%d) ssl(%d%d)\n",
- tty_on,read_tty,write_tty,read_ssl,write_ssl);*/
-
- /* Note: under VMS with SOCKETSHR the second parameter
- * is currently of type (int *) whereas under other
- * systems it is (void *) if you don't have a cast it
- * will choke the compiler: if you do have a cast then
- * you can either go for (int *) or (void *).
- */
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
- /* Under Windows/DOS we make the assumption that we can
- * always write to the tty: therefore if we need to
- * write to the tty we just fall through. Otherwise
- * we timeout the select every second and see if there
- * are any keypresses. Note: this is a hack, in a proper
- * Windows application we wouldn't do this.
- */
- i=0;
- if(!write_tty) {
- if(read_tty) {
- tv.tv_sec = 1;
- tv.tv_usec = 0;
- i=select(width,(void *)&readfds,(void
*)&writefds,
- NULL,&tv);
-#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
- if(!i && (!_kbhit() || !read_tty) )
continue;
-#else
- if(!i && (!((_kbhit()) ||
(WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) ||
!read_tty) ) continue;
-#endif
- } else i=select(width,(void *)&readfds,(void
*)&writefds,
- NULL,timeoutp);
- }
-#else
i=select(width,(void *)&readfds,(void *)&writefds,
NULL,timeoutp);
-#endif
if ( i < 0)
{
BIO_printf(bio_err,"bad select %d\n",
@@ -1686,12 +1628,7 @@ SSL_set_tlsext_status_ids(con, ids);
goto shut;
}
}
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) ||
defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS_R5)
- /* Assume Windows/DOS/BeOS can always write */
- else if (!ssl_pending && write_tty)
-#else
else if (!ssl_pending && FD_ISSET(fileno(stdout),&writefds))
-#endif
{
i=raw_write_stdout(&(sbuf[sbuf_off]),sbuf_len);
@@ -1767,15 +1704,7 @@ printf("read=%d pending=%d peek=%d\n",k,
}
}
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
-#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
- else if (_kbhit())
-#else
- else if ((_kbhit()) || (WAIT_OBJECT_0 ==
WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
-#endif
-#else
else if (FD_ISSET(fileno(stdin),&readfds))
-#endif
{
if (crlf)
{
Index: apps/s_server.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/apps/s_server.c,v
retrieving revision 1.24
diff -u -p -r1.24 s_server.c
--- apps/s_server.c 16 Apr 2014 18:23:52 -0000 1.24
+++ apps/s_server.c 17 Apr 2014 07:09:45 -0000
@@ -1785,11 +1785,7 @@ static int sv_body(char *hostname, int s
KSSL_CTX *kctx;
#endif
struct timeval timeout;
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) ||
defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS_R5)
- struct timeval tv;
-#else
struct timeval *timeoutp;
-#endif
if ((buf=OPENSSL_malloc(bufsize)) == NULL)
{
@@ -1920,29 +1916,9 @@ static int sv_body(char *hostname, int s
if (!read_from_sslcon)
{
FD_ZERO(&readfds);
-#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) &&
!defined(OPENSSL_SYS_NETWARE) && !defined(OPENSSL_SYS_BEOS_R5)
openssl_fdset(fileno(stdin),&readfds);
-#endif
openssl_fdset(s,&readfds);
- /* Note: under VMS with SOCKETSHR the second parameter
is
- * currently of type (int *) whereas under other systems
- * it is (void *) if you don't have a cast it will choke
- * the compiler: if you do have a cast then you can
either
- * go for (int *) or (void *).
- */
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) ||
defined(OPENSSL_SYS_NETWARE)
- /* Under DOS (non-djgpp) and Windows we can't select
on stdin: only
- * on sockets. As a workaround we timeout the select
every
- * second and check for any keypress. In a proper
Windows
- * application we wouldn't do this because it is
inefficient.
- */
- tv.tv_sec = 1;
- tv.tv_usec = 0;
- i=select(width,(void *)&readfds,NULL,NULL,&tv);
- if((i < 0) || (!i && !_kbhit() ) )continue;
- if(_kbhit())
- read_from_terminal = 1;
-#else
+
if ((SSL_version(con) == DTLS1_VERSION) &&
DTLSv1_get_timeout(con, &timeout))
timeoutp = &timeout;
@@ -1959,7 +1935,6 @@ static int sv_body(char *hostname, int s
if (i <= 0) continue;
if (FD_ISSET(fileno(stdin),&readfds))
read_from_terminal = 1;
-#endif
if (FD_ISSET(s,&readfds))
read_from_sslcon = 1;
}
Index: apps/s_socket.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/apps/s_socket.c,v
retrieving revision 1.19
diff -u -p -r1.19 s_socket.c
--- apps/s_socket.c 16 Apr 2014 02:50:09 -0000 1.19
+++ apps/s_socket.c 17 Apr 2014 07:09:45 -0000
@@ -84,14 +84,7 @@
#ifndef OPENSSL_NO_SOCK
-#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
-#include "netdb.h"
-#endif
-
static struct hostent *GetHostByName(char *name);
-#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) &&
!defined(NETWARE_BSDSOCK))
-static void ssl_sock_cleanup(void);
-#endif
static int ssl_sock_init(void);
static int init_server(int *sock, int port, int type);
static int init_server_long(int *sock, int port,char *ip, int type);
@@ -99,51 +92,8 @@ static int do_accept(int acc_sock, int *
#define SOCKET_PROTOCOL IPPROTO_TCP
-#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
-static int wsa_init_done=0;
-#endif
-
-
-#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
-static void sock_cleanup(void)
- {
- if (wsa_init_done)
- {
- wsa_init_done=0;
- WSACleanup();
- }
- }
-#endif
-
static int ssl_sock_init(void)
{
-#ifdef WATT32
- extern int _watt_do_exit;
- _watt_do_exit = 0;
- if (sock_init())
- return (0);
-#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
- WORD wVerReq;
- WSADATA wsaData;
- int err;
-
- if (!wsa_init_done)
- {
-
-# ifdef SIGINT
- signal(SIGINT,(void (*)(int))sock_cleanup);
-# endif
-
- wsa_init_done=1;
- wVerReq = MAKEWORD( 2, 0 );
- err = WSAStartup(wVerReq,&wsaData);
- if (err != 0)
- {
- BIO_printf(bio_err,"unable to start WINSOCK2, error code=%d\n",err);
- return(0);
- }
- }
-#endif /* OPENSSL_SYS_WINDOWS */
return(1);
}
@@ -174,14 +124,12 @@ int init_client(int *sock, char *host, c
{
s=socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (s == -1) { continue; }
-#ifndef OPENSSL_SYS_MPE
if (type == SOCK_STREAM)
{
i=0;
i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
if (i < 0) { perror("keepalive"); return(0); }
}
-#endif
if ((i = connect(s, ai->ai_addr, ai->ai_addrlen)) == 0)
{ *sock=s; freeaddrinfo(ai_top); return (1); }
@@ -315,11 +263,6 @@ redoit:
ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
if (ret == -1)
{
-#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) &&
!defined(NETWARE_BSDSOCK))
- int i;
- i=WSAGetLastError();
- BIO_printf(bio_err,"accept error %d\n",i);
-#else
if (errno == EINTR)
{
/*check_timeout(); */
@@ -327,7 +270,6 @@ redoit:
}
fprintf(stderr,"errno=%d ",errno);
perror("accept");
-#endif
return(0);
}
Index: crypto/cryptlib.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/cryptlib.c,v
retrieving revision 1.18
diff -u -p -r1.18 cryptlib.c
--- crypto/cryptlib.c 16 Apr 2014 02:42:05 -0000 1.18
+++ crypto/cryptlib.c 17 Apr 2014 07:09:47 -0000
@@ -117,10 +117,6 @@
#include "cryptlib.h"
#include <openssl/safestack.h>
-#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
-static double SSLeay_MSVC5_hack = 0.0; /* and for VC1.5 */
-#endif
-
DECLARE_STACK_OF(CRYPTO_dynlock)
/* real #defines in crypto.h, keep these upto date */
@@ -646,11 +642,7 @@ unsigned long
#if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM) &&
!defined(I386_ONLY)
#define OPENSSL_CPUID_SETUP
-#if defined(_WIN32)
-typedef unsigned __int64 IA32CAP;
-#else
typedef unsigned long long IA32CAP;
-#endif
void
OPENSSL_cpuid_setup(void)
{
@@ -665,11 +657,7 @@ OPENSSL_cpuid_setup(void)
trigger = 1;
if ((env = getenv("OPENSSL_ia32cap"))) {
int off = (env[0]=='~') ? 1 : 0;
-#if defined(_WIN32)
- if (!sscanf(env+off, "%I64i", &vec)) vec = strtoul(env+off,
NULL, 0);
-#else
if (!sscanf(env+off, "%lli",(long long *)&vec)) vec =
strtoul(env+off, NULL, 0);
-#endif
if (off)
vec = OPENSSL_ia32_cpuid()&~vec;
} else
Index: crypto/o_dir_test.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/o_dir_test.c,v
retrieving revision 1.3
diff -u -p -r1.3 o_dir_test.c
--- crypto/o_dir_test.c 15 Apr 2014 13:41:53 -0000 1.3
+++ crypto/o_dir_test.c 17 Apr 2014 07:09:47 -0000
@@ -37,19 +37,13 @@
#include "e_os2.h"
#include "o_dir.h"
-#if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined
OPENSSL_SYS_WINCE
-#define CURRDIR "."
-#else
-#error "No supported platform defined!"
-#endif
-
int
main()
{
OPENSSL_DIR_CTX *ctx = NULL;
const char *result;
- while ((result = OPENSSL_DIR_read(&ctx, CURRDIR)) != NULL) {
+ while ((result = OPENSSL_DIR_read(&ctx, ".")) != NULL) {
printf("%s\n", result);
}
Index: crypto/ossl_typ.h
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/ossl_typ.h,v
retrieving revision 1.8
diff -u -p -r1.8 ossl_typ.h
--- crypto/ossl_typ.h 15 Apr 2014 13:42:55 -0000 1.8
+++ crypto/ossl_typ.h 17 Apr 2014 07:09:47 -0000
@@ -99,15 +99,6 @@ typedef int ASN1_NULL;
typedef struct ASN1_ITEM_st ASN1_ITEM;
typedef struct asn1_pctx_st ASN1_PCTX;
-#ifdef OPENSSL_SYS_WIN32
-#undef X509_NAME
-#undef X509_EXTENSIONS
-#undef X509_CERT_PAIR
-#undef PKCS7_ISSUER_AND_SERIAL
-#undef OCSP_REQUEST
-#undef OCSP_RESPONSE
-#endif
-
#ifdef BIGNUM
#undef BIGNUM
#endif
Index: crypto/bf/bf_opts.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/bf/bf_opts.c,v
retrieving revision 1.5
diff -u -p -r1.5 bf_opts.c
--- crypto/bf/bf_opts.c 6 Sep 2008 12:17:48 -0000 1.5
+++ crypto/bf/bf_opts.c 17 Apr 2014 07:09:49 -0000
@@ -59,9 +59,7 @@
/* define PART1, PART2, PART3 or PART4 to build only with a few of the options.
* This is for machines with 64k code segment size restrictions. */
-#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) ||
defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
#define TIMES
-#endif
#include <stdio.h>
@@ -69,35 +67,11 @@
#include OPENSSL_UNISTD_IO
OPENSSL_DECLARE_EXIT
-#ifndef OPENSSL_SYS_NETWARE
#include <signal.h>
-#endif
-#ifndef _IRIX
#include <time.h>
-#endif
-#ifdef TIMES
#include <sys/types.h>
#include <sys/times.h>
-#endif
-
-/* Depending on the VMS version, the tms structure is perhaps defined.
- The __TMS macro will show if it was. If it wasn't defined, we should
- undefine TIMES, since that tells the rest of the program how things
- should be handled. -- Richard Levitte */
-#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
-#undef TIMES
-#endif
-
-#ifndef TIMES
-#include <sys/timeb.h>
-#endif
-
-#if defined(sun) || defined(__ultrix)
-#define _POSIX_SOURCE
-#include <limits.h>
-#include <sys/param.h>
-#endif
#include <openssl/blowfish.h>
@@ -141,23 +115,17 @@ OPENSSL_DECLARE_EXIT
long run=0;
double Time_F(int s);
-#ifdef SIGALRM
#if defined(__STDC__) || defined(sgi)
#define SIGRETTYPE void
#else
#define SIGRETTYPE int
-#endif
SIGRETTYPE sig_done(int sig);
SIGRETTYPE sig_done(int sig)
{
signal(SIGALRM,sig_done);
run=0;
-#ifdef LINT
- sig=sig;
-#endif
}
-#endif
#define START 0
#define STOP 1
@@ -165,7 +133,6 @@ SIGRETTYPE sig_done(int sig)
double Time_F(int s)
{
double ret;
-#ifdef TIMES
static struct tms tstart,tend;
if (s == START)
@@ -179,30 +146,9 @@ double Time_F(int s)
ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
return((ret == 0.0)?1e-6:ret);
}
-#else /* !times() */
- static struct timeb tstart,tend;
- long i;
-
- if (s == START)
- {
- ftime(&tstart);
- return(0);
- }
- else
- {
- ftime(&tend);
- i=(long)tend.millitm-(long)tstart.millitm;
- ret=((double)(tend.time-tstart.time))+((double)i)/1000.0;
- return((ret == 0.0)?1e-6:ret);
- }
-#endif
}
-#ifdef SIGALRM
#define print_name(name) fprintf(stderr,"Doing %s's for 10 seconds\n",name);
alarm(10);
-#else
-#define print_name(name) fprintf(stderr,"Doing %s %ld times\n",name,cb);
-#endif
#define time_it(func,name,index) \
print_name(name); \
@@ -234,9 +180,6 @@ int main(int argc, char **argv)
int rank[16];
char *str[16];
int max_idx=0,i,num=0,j;
-#ifndef SIGALARM
- long ca,cb,cc,cd,ce;
-#endif
for (i=0; i<12; i++)
{
@@ -244,40 +187,12 @@ int main(int argc, char **argv)
rank[i]=0;
}
-#ifndef TIMES
- fprintf(stderr,"To get the most accurate results, try to run this\n");
- fprintf(stderr,"program when this computer is idle.\n");
-#endif
-
BF_set_key(&sch,16,key);
-#ifndef SIGALRM
- fprintf(stderr,"First we calculate the approximate speed ...\n");
- count=10;
- do {
- long i;
- unsigned long data[2];
-
- count*=2;
- Time_F(START);
- for (i=count; i; i--)
- BF_encrypt(data,&sch);
- d=Time_F(STOP);
- } while (d < 3.0);
- ca=count;
- cb=count*3;
- cc=count*3*8/BUFSIZE+1;
- cd=count*8/BUFSIZE+1;
-
- ce=count/20+1;
-#define COND(d) (count != (d))
-#define COUNT(d) (d)
-#else
#define COND(c) (run)
#define COUNT(d) (count)
signal(SIGALRM,sig_done);
alarm(10);
-#endif
time_it(BF_encrypt_normal, "BF_encrypt_normal ", 0);
time_it(BF_encrypt_ptr, "BF_encrypt_ptr ", 1);
@@ -325,7 +240,4 @@ int main(int argc, char **argv)
break;
}
exit(0);
-#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
- return(0);
-#endif
}
Index: crypto/bio/b_sock.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/bio/b_sock.c,v
retrieving revision 1.19
diff -u -p -r1.19 b_sock.c
--- crypto/bio/b_sock.c 16 Apr 2014 15:00:28 -0000 1.19
+++ crypto/bio/b_sock.c 17 Apr 2014 07:09:49 -0000
@@ -460,43 +460,12 @@ end:
int
BIO_sock_init(void)
{
-#ifdef WATT32
- extern int _watt_do_exit;
- _watt_do_exit = 0;
- /* don't make sock_init() call exit() */
- if (sock_init())
- return (-1);
-#endif
-
-#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
- WORD wVerReq;
- WSADATA wsaData;
- int err;
-
- if (!wsa_init_done) {
- wsa_init_done = 1;
- wVerReq = MAKEWORD( 2, 0 );
- err = WSAStartup(wVerReq, &wsaData);
- if (err != 0) {
- SYSerr(SYS_F_WSASTARTUP, err);
- BIOerr(BIO_F_BIO_SOCK_INIT, BIO_R_WSASTARTUP);
- return (-1);
- }
- }
-#endif
-
return (1);
}
void
BIO_sock_cleanup(void)
{
-#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
- if (wsa_init_done) {
- wsa_init_done = 0;
- WSACleanup();
- }
-#endif
}
#if !defined(OPENSSL_SYS_VMS) || __VMS_VER >= 70000000
Index: crypto/bio/bss_dgram.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/bio/bss_dgram.c,v
retrieving revision 1.12
diff -u -p -r1.12 bss_dgram.c
--- crypto/bio/bss_dgram.c 16 Apr 2014 13:01:09 -0000 1.12
+++ crypto/bio/bss_dgram.c 17 Apr 2014 07:09:49 -0000
@@ -91,12 +91,6 @@
((a)->s6_addr32[2] == htonl(0x0000ffff)))
#endif
-#ifdef WATT32
-#define sock_write SockWrite /* Watt-32 uses same names */
-#define sock_read SockRead
-#define sock_puts SockPuts
-#endif
-
static int dgram_write(BIO *h, const char *buf, int num);
static int dgram_read(BIO *h, char *buf, int size);
static int dgram_puts(BIO *h, const char *str);
Index: crypto/bio/bss_log.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/bio/bss_log.c,v
retrieving revision 1.12
diff -u -p -r1.12 bss_log.c
--- crypto/bio/bss_log.c 15 Apr 2014 16:37:22 -0000 1.12
+++ crypto/bio/bss_log.c 17 Apr 2014 07:09:49 -0000
@@ -68,28 +68,8 @@
#include "cryptlib.h"
-#if defined(OPENSSL_SYS_WINCE)
-#elif defined(OPENSSL_SYS_WIN32)
-#elif defined(OPENSSL_SYS_VMS)
-# include <opcdef.h>
-# include <descrip.h>
-# include <lib$routines.h>
-# include <starlet.h>
-/* Some compiler options may mask the declaration of "_malloc32". */
-# if __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE
-# if __INITIAL_POINTER_SIZE == 64
-# pragma pointer_size save
-# pragma pointer_size 32
-void * _malloc32 (__size_t);
-# pragma pointer_size restore
-# endif /* __INITIAL_POINTER_SIZE == 64 */
-# endif /* __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE */
-#elif defined(__ultrix)
-# include <sys/syslog.h>
-#elif defined(OPENSSL_SYS_NETWARE)
-# define NO_SYSLOG
-#elif (!defined(MSDOS) || defined(WATT32)) && !defined(OPENSSL_SYS_VXWORKS) &&
!defined(NO_SYSLOG)
-# include <syslog.h>
+#ifndef NO_SYSLOG
+#include <syslog.h>
#endif
#include <openssl/buffer.h>
@@ -97,31 +77,6 @@ void * _malloc32 (__size_t);
#ifndef NO_SYSLOG
-#if defined(OPENSSL_SYS_WIN32)
-#define LOG_EMERG 0
-#define LOG_ALERT 1
-#define LOG_CRIT 2
-#define LOG_ERR 3
-#define LOG_WARNING 4
-#define LOG_NOTICE 5
-#define LOG_INFO 6
-#define LOG_DEBUG 7
-
-#define LOG_DAEMON (3<<3)
-#elif defined(OPENSSL_SYS_VMS)
-/* On VMS, we don't really care about these, but we need them to compile */
-#define LOG_EMERG 0
-#define LOG_ALERT 1
-#define LOG_CRIT 2
-#define LOG_ERR 3
-#define LOG_WARNING 4
-#define LOG_NOTICE 5
-#define LOG_INFO 6
-#define LOG_DEBUG 7
-
-#define LOG_DAEMON OPC$M_NM_NTWORK
-#endif
-
static int slg_write(BIO *h, const char *buf, int num);
static int slg_puts(BIO *h, const char *str);
static long slg_ctrl(BIO *h, int cmd, long arg1, void *arg2);
@@ -245,161 +200,10 @@ slg_puts(BIO *bp, const char *str)
return (ret);
}
-#if defined(OPENSSL_SYS_WIN32)
-
static void
xopenlog(BIO* bp, char* name, int level)
{
- if (check_winnt())
- bp->ptr = RegisterEventSourceA(NULL, name);
- else
- bp->ptr = NULL;
-}
-
-static void
-xsyslog(BIO *bp, int priority, const char *string)
-{
- LPCSTR lpszStrings[2];
- WORD evtype = EVENTLOG_ERROR_TYPE;
- char pidbuf[DECIMAL_SIZE(DWORD) + 4];
-
- if (bp->ptr == NULL)
- return;
-
- switch (priority) {
- case LOG_EMERG:
- case LOG_ALERT:
- case LOG_CRIT:
- case LOG_ERR:
- evtype = EVENTLOG_ERROR_TYPE;
- break;
- case LOG_WARNING:
- evtype = EVENTLOG_WARNING_TYPE;
- break;
- case LOG_NOTICE:
- case LOG_INFO:
- case LOG_DEBUG:
- evtype = EVENTLOG_INFORMATION_TYPE;
- break;
- default: /* Should never happen, but set it
- as error anyway. */
- evtype = EVENTLOG_ERROR_TYPE;
- break;
- }
-
- sprintf(pidbuf, "[%u] ", GetCurrentProcessId());
- lpszStrings[0] = pidbuf;
- lpszStrings[1] = string;
-
- ReportEventA(bp->ptr, evtype, 0, 1024, NULL, 2, 0,
- lpszStrings, NULL);
-}
-
-static void
-xcloselog(BIO* bp)
-{
- if (bp->ptr)
- DeregisterEventSource((HANDLE)(bp->ptr));
- bp->ptr = NULL;
-}
-
-#elif defined(OPENSSL_SYS_VMS)
-
-static int VMS_OPC_target = LOG_DAEMON;
-
-static void
-xopenlog(BIO* bp, char* name, int level)
-{
- VMS_OPC_target = level;
-
-}
-
-static void
-xsyslog(BIO *bp, int priority, const char *string)
-{
- struct dsc$descriptor_s opc_dsc;
-
-/* Arrange 32-bit pointer to opcdef buffer and malloc(), if needed. */
-#if __INITIAL_POINTER_SIZE == 64
-# pragma pointer_size save
-# pragma pointer_size 32
-# define OPCDEF_TYPE __char_ptr32
-# define OPCDEF_MALLOC _malloc32
-#else /* __INITIAL_POINTER_SIZE == 64 */
-# define OPCDEF_TYPE char *
-# define OPCDEF_MALLOC OPENSSL_malloc
-#endif /* __INITIAL_POINTER_SIZE == 64 [else] */
-
- struct opcdef *opcdef_p;
-
-#if __INITIAL_POINTER_SIZE == 64
-# pragma pointer_size restore
-#endif /* __INITIAL_POINTER_SIZE == 64 */
-
- char buf[10240];
- unsigned int len;
- struct dsc$descriptor_s buf_dsc;
- $DESCRIPTOR(fao_cmd, "!AZ: !AZ");
- char *priority_tag;
-
- switch (priority) {
- case LOG_EMERG:
- priority_tag = "Emergency"; break;
- case LOG_ALERT:
- priority_tag = "Alert"; break;
- case LOG_CRIT:
- priority_tag = "Critical"; break;
- case LOG_ERR:
- priority_tag = "Error"; break;
- case LOG_WARNING:
- priority_tag = "Warning"; break;
- case LOG_NOTICE:
- priority_tag = "Notice"; break;
- case LOG_INFO:
- priority_tag = "Info"; break;
- case LOG_DEBUG:
- priority_tag = "DEBUG"; break;
- }
-
- buf_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
- buf_dsc.dsc$b_class = DSC$K_CLASS_S;
- buf_dsc.dsc$a_pointer = buf;
- buf_dsc.dsc$w_length = sizeof(buf) - 1;
-
- lib$sys_fao(&fao_cmd, &len, &buf_dsc, priority_tag, string);
-
- /* We know there's an 8-byte header. That's documented. */
- opcdef_p = OPCDEF_MALLOC( 8 + len);
- opcdef_p->opc$b_ms_type = OPC$_RQ_RQST;
- memcpy(opcdef_p->opc$z_ms_target_classes, &VMS_OPC_target, 3);
- opcdef_p->opc$l_ms_rqstid = 0;
- memcpy(&opcdef_p->opc$l_ms_text, buf, len);
-
- opc_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
- opc_dsc.dsc$b_class = DSC$K_CLASS_S;
- opc_dsc.dsc$a_pointer = (OPCDEF_TYPE) opcdef_p;
- opc_dsc.dsc$w_length = len + 8;
-
- sys$sndopr(opc_dsc, 0);
-
- OPENSSL_free(opcdef_p);
-}
-
-static void
-xcloselog(BIO* bp)
-{
-}
-
-#else /* Unix/Watt32 */
-
-static void
-xopenlog(BIO* bp, char* name, int level)
-{
-#ifdef WATT32 /* djgpp/DOS */
- openlog(name, LOG_PID|LOG_CONS|LOG_NDELAY, level);
-#else
openlog(name, LOG_PID|LOG_CONS, level);
-#endif
}
static void
@@ -413,7 +217,5 @@ xcloselog(BIO* bp)
{
closelog();
}
-
-#endif /* Unix */
#endif /* NO_SYSLOG */
Index: crypto/bio/bss_sock.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/bio/bss_sock.c,v
retrieving revision 1.14
diff -u -p -r1.14 bss_sock.c
--- crypto/bio/bss_sock.c 16 Apr 2014 13:01:09 -0000 1.14
+++ crypto/bio/bss_sock.c 17 Apr 2014 07:09:49 -0000
@@ -65,12 +65,6 @@
#include <openssl/bio.h>
-#ifdef WATT32
-#define sock_write SockWrite /* Watt-32 uses same names */
-#define sock_read SockRead
-#define sock_puts SockPuts
-#endif
-
static int sock_write(BIO *h, const char *buf, int num);
static int sock_read(BIO *h, char *buf, int size);
static int sock_puts(BIO *h, const char *str);
Index: crypto/conf/conf_def.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/conf/conf_def.c,v
retrieving revision 1.13
diff -u -p -r1.13 conf_def.c
--- crypto/conf/conf_def.c 15 Apr 2014 16:21:04 -0000 1.13
+++ crypto/conf/conf_def.c 17 Apr 2014 07:09:52 -0000
@@ -186,11 +186,7 @@ static int def_load(CONF *conf, const ch
int ret;
BIO *in=NULL;
-#ifdef OPENSSL_SYS_VMS
- in=BIO_new_file(name, "r");
-#else
in=BIO_new_file(name, "rb");
-#endif
if (in == NULL)
{
if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE)
Index: crypto/conf/conf_lib.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/conf/conf_lib.c,v
retrieving revision 1.6
diff -u -p -r1.6 conf_lib.c
--- crypto/conf/conf_lib.c 1 Oct 2010 22:58:54 -0000 1.6
+++ crypto/conf/conf_lib.c 17 Apr 2014 07:09:52 -0000
@@ -93,11 +93,7 @@ LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF
LHASH_OF(CONF_VALUE) *ltmp;
BIO *in=NULL;
-#ifdef OPENSSL_SYS_VMS
- in=BIO_new_file(file, "r");
-#else
in=BIO_new_file(file, "rb");
-#endif
if (in == NULL)
{
CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
@@ -387,21 +383,3 @@ int NCONF_dump_bio(const CONF *conf, BIO
return conf->meth->dump(conf, out);
}
-
-
-/* This function should be avoided */
-#if 0
-long NCONF_get_number(CONF *conf,char *group,char *name)
- {
- int status;
- long ret=0;
-
- status = NCONF_get_number_e(conf, group, name, &ret);
- if (status == 0)
- {
- /* This function does not believe in errors... */
- ERR_get_error();
- }
- return ret;
- }
-#endif
Index: crypto/conf/conf_mod.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/conf/conf_mod.c,v
retrieving revision 1.11
diff -u -p -r1.11 conf_mod.c
--- crypto/conf/conf_mod.c 15 Apr 2014 16:21:04 -0000 1.11
+++ crypto/conf/conf_mod.c 17 Apr 2014 07:09:52 -0000
@@ -553,9 +553,7 @@ char *CONF_get1_default_config_file(void
return BUF_strdup(file);
len = strlen(X509_get_default_cert_area());
-#ifndef OPENSSL_SYS_VMS
len++;
-#endif
len += strlen(OPENSSL_CONF);
file = OPENSSL_malloc(len + 1);
@@ -563,9 +561,7 @@ char *CONF_get1_default_config_file(void
if (!file)
return NULL;
BUF_strlcpy(file,X509_get_default_cert_area(),len + 1);
-#ifndef OPENSSL_SYS_VMS
BUF_strlcat(file,"/",len + 1);
-#endif
BUF_strlcat(file,OPENSSL_CONF,len + 1);
return file;
Index: crypto/x509/by_dir.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/x509/by_dir.c,v
retrieving revision 1.14
diff -u -p -r1.14 by_dir.c
--- crypto/x509/by_dir.c 15 Apr 2014 17:24:25 -0000 1.14
+++ crypto/x509/by_dir.c 17 Apr 2014 07:10:06 -0000
@@ -62,12 +62,8 @@
#include "cryptlib.h"
-#ifndef NO_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifndef OPENSSL_NO_POSIX_IO
-# include <sys/stat.h>
-#endif
+#include <sys/types.h>
+#include <sys/stat.h>
#include <openssl/lhash.h>
#include <openssl/x509.h>
@@ -339,20 +335,6 @@ get_cert_by_subject(X509_LOOKUP *xl, int
}
for (;;) {
char c = '/';
-#ifdef OPENSSL_SYS_VMS
- c = ent->dir[strlen(ent->dir) - 1];
- if (c != ':' && c != '>' && c != ']') {
- /* If no separator is present, we assume the
- directory specifier is a logical name, and
- add a colon. We really should use better
- VMS routines for merging things like this,
- but this will do for now...
- -- Richard Levitte */
- c = ':';
- } else {
- c = '\0';
- }
-#endif
if (c == '\0') {
/* This is special. When c == '\0', no
directory separator should be added. */
@@ -364,16 +346,11 @@ get_cert_by_subject(X509_LOOKUP *xl, int
"%s%c%08lx.%s%d", ent->dir, c, h,
postfix, k);
}
-#ifndef OPENSSL_NO_POSIX_IO
-#ifdef _WIN32
-#define stat _stat
-#endif
{
struct stat st;
if (stat(b->data, &st) < 0)
break;
}
-#endif
/* found one. */
if (type == X509_LU_X509) {
if ((X509_load_cert_file(xl, b->data,
Index: crypto/x509/x509.h
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/x509/x509.h,v
retrieving revision 1.16
diff -u -p -r1.16 x509.h
--- crypto/x509/x509.h 15 Apr 2014 20:19:57 -0000 1.16
+++ crypto/x509/x509.h 17 Apr 2014 07:10:06 -0000
@@ -111,13 +111,6 @@
extern "C" {
#endif
-#ifdef OPENSSL_SYS_WIN32
-/* Under Win32 these are defined in wincrypt.h */
-#undef X509_NAME
-#undef X509_CERT_PAIR
-#undef X509_EXTENSIONS
-#endif
-
#define X509_FILETYPE_PEM 1
#define X509_FILETYPE_ASN1 2
#define X509_FILETYPE_DEFAULT 3
Index: demos/bio/saccept.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/demos/bio/Attic/saccept.c,v
retrieving revision 1.4
diff -u -p -r1.4 saccept.c
--- demos/bio/saccept.c 12 May 2003 02:18:39 -0000 1.4
+++ demos/bio/saccept.c 17 Apr 2014 07:10:07 -0000
@@ -45,11 +45,6 @@ char *argv[];
SSL_load_error_strings();
-#ifdef WATT32
- dbug_init();
- sock_init();
-#endif
-
/* Add ciphers and message digests */
OpenSSL_add_ssl_algorithms();
Index: demos/bio/sconnect.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/demos/bio/Attic/sconnect.c,v
retrieving revision 1.4
diff -u -p -r1.4 sconnect.c
--- demos/bio/sconnect.c 12 May 2003 02:18:39 -0000 1.4
+++ demos/bio/sconnect.c 17 Apr 2014 07:10:07 -0000
@@ -32,11 +32,6 @@ char *argv[];
else
host=argv[1];
-#ifdef WATT32
- dbug_init();
- sock_init();
-#endif
-
/* Lets get nice error messages */
SSL_load_error_strings();