aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/apps.c2
-rw-r--r--apps/ciphers.c3
-rw-r--r--apps/dhparam.c4
-rw-r--r--apps/dsaparam.c4
-rw-r--r--apps/engine.c3
-rw-r--r--apps/gendh.c4
-rw-r--r--apps/genrsa.c4
-rw-r--r--apps/openssl.c4
-rw-r--r--apps/req.c3
-rw-r--r--apps/s_apps.h14
-rw-r--r--apps/s_cb.c14
-rw-r--r--apps/s_client.c10
-rw-r--r--apps/s_server.c11
-rw-r--r--apps/s_socket.c51
-rw-r--r--apps/s_time.c3
-rw-r--r--apps/ts.c8
-rw-r--r--apps/verify.c4
-rw-r--r--apps/x509.c7
18 files changed, 43 insertions, 110 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 80762c1cc0..ac709a6a3d 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -290,7 +290,7 @@ int str2fmt(char *s)
return(FORMAT_UNDEF);
}
-#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_NETWARE)
+#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_NETWARE)
void program_name(char *in, char *out, int size)
{
int i,n;
diff --git a/apps/ciphers.c b/apps/ciphers.c
index 7de7dd3b38..0018360018 100644
--- a/apps/ciphers.c
+++ b/apps/ciphers.c
@@ -59,9 +59,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
#include "apps.h"
#include <openssl/err.h>
#include <openssl/ssl.h>
diff --git a/apps/dhparam.c b/apps/dhparam.c
index 7982222abc..86bf19d861 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -144,7 +144,7 @@
* -C
*/
-static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb);
+static int dh_cb(int p, int n, BN_GENCB *cb);
int MAIN(int, char **);
@@ -551,7 +551,7 @@ end:
}
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
-static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
+static int dh_cb(int p, int n, BN_GENCB *cb)
{
char c='*';
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index a922335c31..7a9ed82e75 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -101,7 +101,7 @@ static void timebomb_sigalarm(int foo)
#endif
-static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb);
+static int dsa_cb(int p, int n, BN_GENCB *cb);
int MAIN(int, char **);
@@ -468,7 +468,7 @@ end:
OPENSSL_EXIT(ret);
}
-static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb)
+static int dsa_cb(int p, int n, BN_GENCB *cb)
{
char c='*';
diff --git a/apps/engine.c b/apps/engine.c
index 9a0294398e..04d4f73cd4 100644
--- a/apps/engine.c
+++ b/apps/engine.c
@@ -60,9 +60,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
#include "apps.h"
#include <openssl/err.h>
#ifndef OPENSSL_NO_ENGINE
diff --git a/apps/gendh.c b/apps/gendh.c
index 4581bfac70..ec6842528a 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -77,7 +77,7 @@
#undef PROG
#define PROG gendh_main
-static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb);
+static int dh_cb(int p, int n, BN_GENCB *cb);
int MAIN(int, char **);
@@ -218,7 +218,7 @@ end:
OPENSSL_EXIT(ret);
}
-static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
+static int dh_cb(int p, int n, BN_GENCB *cb)
{
char c='*';
diff --git a/apps/genrsa.c b/apps/genrsa.c
index fe00af9bd2..b0bba054cd 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -77,7 +77,7 @@
#undef PROG
#define PROG genrsa_main
-static int MS_CALLBACK genrsa_cb(int p, int n, BN_GENCB *cb);
+static int genrsa_cb(int p, int n, BN_GENCB *cb);
int MAIN(int, char **);
@@ -312,7 +312,7 @@ err:
OPENSSL_EXIT(ret);
}
-static int MS_CALLBACK genrsa_cb(int p, int n, BN_GENCB *cb)
+static int genrsa_cb(int p, int n, BN_GENCB *cb)
{
char c='*';
diff --git a/apps/openssl.c b/apps/openssl.c
index 7453e6528c..c438dafaff 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -698,13 +698,13 @@ static void list_md(BIO *out)
EVP_MD_do_all_sorted(list_md_fn, out);
}
-static int MS_CALLBACK function_cmp(const FUNCTION *a, const FUNCTION *b)
+static int function_cmp(const FUNCTION *a, const FUNCTION *b)
{
return strncmp(a->name,b->name,8);
}
static IMPLEMENT_LHASH_COMP_FN(function, FUNCTION)
-static unsigned long MS_CALLBACK function_hash(const FUNCTION *a)
+static unsigned long function_hash(const FUNCTION *a)
{
return lh_strhash(a->name);
}
diff --git a/apps/req.c b/apps/req.c
index 686fac4f5d..e23c9197a5 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -60,9 +60,6 @@
#include <stdlib.h>
#include <time.h>
#include <string.h>
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
#include "apps.h"
#include <openssl/bio.h>
#include <openssl/evp.h>
diff --git a/apps/s_apps.h b/apps/s_apps.h
index 9d16e45978..625e1eb266 100644
--- a/apps/s_apps.h
+++ b/apps/s_apps.h
@@ -157,7 +157,7 @@ int do_server_unix(const char *path, int *ret,
unsigned char *context, int naccept);
#endif
#ifdef HEADER_X509_H
-int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx);
+int verify_callback(int ok, X509_STORE_CTX *ctx);
#endif
#ifdef HEADER_SSL_H
int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file);
@@ -176,19 +176,19 @@ int should_retry(int i);
int extract_port(const char *str, short *port_ptr);
int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p);
-long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
+long bio_dump_callback(BIO *bio, int cmd, const char *argp,
int argi, long argl, long ret);
#ifdef HEADER_SSL_H
-void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret);
-void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
-void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
+void apps_ssl_info_callback(const SSL *s, int where, int ret);
+void msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
+void tlsext_cb(SSL *s, int client_server, int type,
unsigned char *data, int len,
void *arg);
#endif
-int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len);
-int MS_CALLBACK verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len);
+int generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len);
+int verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len);
typedef struct ssl_excert_st SSL_EXCERT;
diff --git a/apps/s_cb.c b/apps/s_cb.c
index 7720144d59..758da231be 100644
--- a/apps/s_cb.c
+++ b/apps/s_cb.c
@@ -135,7 +135,7 @@ int verify_return_error=0;
unsigned char cookie_secret[COOKIE_SECRET_LENGTH];
int cookie_initialized=0;
-int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
+int verify_callback(int ok, X509_STORE_CTX *ctx)
{
X509 *err_cert;
int err,depth;
@@ -557,7 +557,7 @@ int ssl_print_tmp_key(BIO *out, SSL *s)
}
-long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
+long bio_dump_callback(BIO *bio, int cmd, const char *argp,
int argi, long argl, long ret)
{
BIO *out;
@@ -581,7 +581,7 @@ long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
return(ret);
}
-void MS_CALLBACK apps_ssl_info_callback(const SSL *s, int where, int ret)
+void apps_ssl_info_callback(const SSL *s, int where, int ret)
{
const char *str;
int w;
@@ -638,7 +638,7 @@ static const char *ssl_version_str(int version)
}
}
-void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)
+void msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)
{
BIO *bio = arg;
const char *str_write_p, *str_version, *str_content_type = "", *str_details1 = "", *str_details2= "";
@@ -868,7 +868,7 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
(void)BIO_flush(bio);
}
-void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
+void tlsext_cb(SSL *s, int client_server, int type,
unsigned char *data, int len,
void *arg)
{
@@ -981,7 +981,7 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
(void)BIO_flush(bio);
}
-int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len)
+int generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len)
{
unsigned char *buffer, result[EVP_MAX_MD_SIZE];
unsigned int length, resultlength;
@@ -1069,7 +1069,7 @@ int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, unsign
return 1;
}
-int MS_CALLBACK verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len)
+int verify_cookie_callback(SSL *ssl, unsigned char *cookie, unsigned int cookie_len)
{
unsigned char *buffer, result[EVP_MAX_MD_SIZE];
unsigned int length, resultlength;
diff --git a/apps/s_client.c b/apps/s_client.c
index d650cc40ce..199a587dcb 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -141,10 +141,6 @@
#include <stdlib.h>
#include <string.h>
#include <openssl/e_os2.h>
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
-
/* With IPv6, it looks like Digital has mixed up the proper order of
recursive header file inclusion, resulting in the compiler complaining
that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
@@ -384,7 +380,7 @@ typedef struct tlsextctx_st {
} tlsextctx;
-static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg)
+static int ssl_servername_cb(SSL *s, int *ad, void *arg)
{
tlsextctx * p = (tlsextctx *) arg;
const char * hn= SSL_get_servername(s, TLSEXT_NAMETYPE_host_name);
@@ -454,7 +450,7 @@ static int srp_Verify_N_and_g(const BIGNUM *N, const BIGNUM *g)
primality tests are rather cpu consuming.
*/
-static int MS_CALLBACK ssl_srp_verify_param_cb(SSL *s, void *arg)
+static int ssl_srp_verify_param_cb(SSL *s, void *arg)
{
SRP_ARG *srp_arg = (SRP_ARG *)arg;
BIGNUM *N = NULL, *g = NULL;
@@ -489,7 +485,7 @@ static int MS_CALLBACK ssl_srp_verify_param_cb(SSL *s, void *arg)
#define PWD_STRLEN 1024
-static char * MS_CALLBACK ssl_give_srp_client_pwd_cb(SSL *s, void *arg)
+static char * ssl_give_srp_client_pwd_cb(SSL *s, void *arg)
{
SRP_ARG *srp_arg = (SRP_ARG *)arg;
char *pass = (char *)OPENSSL_malloc(PWD_STRLEN+1);
diff --git a/apps/s_server.c b/apps/s_server.c
index 6690646c8c..412091dd11 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -148,9 +148,6 @@
#include <string.h>
#include <openssl/e_os2.h>
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
#if !defined(OPENSSL_SYS_NETWARE) /* conflicts with winsock2 stuff on netware */
#include <sys/types.h>
@@ -193,7 +190,7 @@ typedef unsigned int u_int;
#endif
#ifndef OPENSSL_NO_RSA
-static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength);
+static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength);
#endif
static int not_resumable_sess_cb(SSL *s, int is_forward_secure);
static int sv_body(char *hostname, int s, int stype, unsigned char *context);
@@ -367,7 +364,7 @@ typedef struct srpsrvparm_st
(which would normally occur after a worker has finished) and we
set the user parameters.
*/
-static int MS_CALLBACK ssl_srp_server_param_cb(SSL *s, int *ad, void *arg)
+static int ssl_srp_server_param_cb(SSL *s, int *ad, void *arg)
{
srpsrvparm *p = (srpsrvparm *)arg;
if (p->login == NULL && p->user == NULL )
@@ -721,7 +718,7 @@ typedef struct tlsextctx_st {
} tlsextctx;
-static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg)
+static int ssl_servername_cb(SSL *s, int *ad, void *arg)
{
tlsextctx * p = (tlsextctx *) arg;
const char * servername = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name);
@@ -3411,7 +3408,7 @@ err:
}
#ifndef OPENSSL_NO_RSA
-static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength)
+static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength)
{
BIGNUM *bn = NULL;
static RSA *rsa_tmp=NULL;
diff --git a/apps/s_socket.c b/apps/s_socket.c
index f44050db40..397cb1effc 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -107,12 +107,6 @@ static int init_server_unix(int *sock, const char *path);
static int do_accept_unix(int acc_sock, int *sock);
#endif
-#ifdef OPENSSL_SYS_WIN16
-#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
-#else
-#define SOCKET_PROTOCOL IPPROTO_TCP
-#endif
-
#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
static int wsa_init_done=0;
#endif
@@ -121,36 +115,6 @@ static int wsa_init_done=0;
static struct WSAData wsa_state;
static int wsa_init_done=0;
-#ifdef OPENSSL_SYS_WIN16
-static HWND topWnd=0;
-static FARPROC lpTopWndProc=NULL;
-static FARPROC lpTopHookProc=NULL;
-extern HINSTANCE _hInstance; /* nice global CRT provides */
-
-static LONG FAR PASCAL topHookProc(HWND hwnd, UINT message, WPARAM wParam,
- LPARAM lParam)
- {
- if (hwnd == topWnd)
- {
- switch(message)
- {
- case WM_DESTROY:
- case WM_CLOSE:
- SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopWndProc);
- ssl_sock_cleanup();
- break;
- }
- }
- return CallWindowProc(lpTopWndProc,hwnd,message,wParam,lParam);
- }
-
-static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam)
- {
- topWnd=hwnd;
- return(FALSE);
- }
-
-#endif /* OPENSSL_SYS_WIN32 */
#endif /* OPENSSL_SYS_WINDOWS */
#ifdef OPENSSL_SYS_WINDOWS
@@ -199,14 +163,6 @@ static int ssl_sock_init(void)
BIO_printf(bio_err,"unable to start WINSOCK, error code=%d\n",err);
return(0);
}
-
-#ifdef OPENSSL_SYS_WIN16
- EnumTaskWindows(GetCurrentTask(),enumproc,0L);
- lpTopWndProc=(FARPROC)GetWindowLong(topWnd,GWL_WNDPROC);
- lpTopHookProc=MakeProcInstance((FARPROC)topHookProc,_hInstance);
-
- SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
-#endif /* OPENSSL_SYS_WIN16 */
}
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
WORD wVerReq;
@@ -263,7 +219,7 @@ static int init_client_ip(int *sock, const unsigned char ip[4], int port,
them.sin_addr.s_addr=htonl(addr);
if (type == SOCK_STREAM)
- s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
+ s=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
else /* ( type == SOCK_DGRAM) */
s=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
@@ -412,7 +368,7 @@ static int init_server_long(int *sock, int port, char *ip, int type)
#endif
if (type == SOCK_STREAM)
- s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
+ s=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
else /* type == SOCK_DGRAM */
s=socket(AF_INET, SOCK_DGRAM,IPPROTO_UDP);
@@ -667,8 +623,7 @@ static int host_ip(const char *str, unsigned char ip[4])
BIO_printf(bio_err,"gethostbyname failure\n");
goto err;
}
- /* cast to short because of win16 winsock definition */
- if ((short)he->h_addrtype != AF_INET)
+ if (he->h_addrtype != AF_INET)
{
BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n");
return(0);
diff --git a/apps/s_time.c b/apps/s_time.c
index 6542be2827..dfe8df70fa 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -69,9 +69,6 @@
#define USE_SOCKETS
#include "apps.h"
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
#include <openssl/x509.h>
#include <openssl/ssl.h>
#include <openssl/pem.h>
diff --git a/apps/ts.c b/apps/ts.c
index ace13bdddb..2a1d666406 100644
--- a/apps/ts.c
+++ b/apps/ts.c
@@ -103,7 +103,7 @@ static TS_RESP *read_PKCS7(BIO *in_bio);
static TS_RESP *create_response(CONF *conf, const char *section, char *engine,
char *queryfile, char *passin, char *inkey,
char *signer, char *chain, const char *policy);
-static ASN1_INTEGER * MS_CALLBACK serial_cb(TS_RESP_CTX *ctx, void *data);
+static ASN1_INTEGER * serial_cb(TS_RESP_CTX *ctx, void *data);
static ASN1_INTEGER *next_serial(const char *serialfile);
static int save_ts_serial(const char *serialfile, ASN1_INTEGER *serial);
@@ -116,7 +116,7 @@ static TS_VERIFY_CTX *create_verify_ctx(char *data, char *digest,
char *ca_path, char *ca_file,
char *untrusted);
static X509_STORE *create_cert_store(char *ca_path, char *ca_file);
-static int MS_CALLBACK verify_cb(int ok, X509_STORE_CTX *ctx);
+static int verify_cb(int ok, X509_STORE_CTX *ctx);
/* Main function definition. */
int MAIN(int, char **);
@@ -876,7 +876,7 @@ static TS_RESP *create_response(CONF *conf, const char *section, char *engine,
return response;
}
-static ASN1_INTEGER * MS_CALLBACK serial_cb(TS_RESP_CTX *ctx, void *data)
+static ASN1_INTEGER * serial_cb(TS_RESP_CTX *ctx, void *data)
{
const char *serial_file = (const char *) data;
ASN1_INTEGER *serial = next_serial(serial_file);
@@ -1128,7 +1128,7 @@ static X509_STORE *create_cert_store(char *ca_path, char *ca_file)
return NULL;
}
-static int MS_CALLBACK verify_cb(int ok, X509_STORE_CTX *ctx)
+static int verify_cb(int ok, X509_STORE_CTX *ctx)
{
/*-
char buf[256];
diff --git a/apps/verify.c b/apps/verify.c
index b9480bd812..2b2224f516 100644
--- a/apps/verify.c
+++ b/apps/verify.c
@@ -69,7 +69,7 @@
#undef PROG
#define PROG verify_main
-static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx);
+static int cb(int ok, X509_STORE_CTX *ctx);
static int check(X509_STORE *ctx, char *file,
STACK_OF(X509) *uchain, STACK_OF(X509) *tchain,
STACK_OF(X509_CRL) *crls, ENGINE *e, int show_chain);
@@ -342,7 +342,7 @@ end:
return(ret);
}
-static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
+static int cb(int ok, X509_STORE_CTX *ctx)
{
int cert_error = X509_STORE_CTX_get_error(ctx);
X509 *current_cert = X509_STORE_CTX_get_current_cert(ctx);
diff --git a/apps/x509.c b/apps/x509.c
index 3bb261010f..b3c23907bf 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -60,9 +60,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
#include "apps.h"
#include <openssl/bio.h>
#include <openssl/asn1.h>
@@ -156,7 +153,7 @@ static const char *x509_usage[]={
NULL
};
-static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx);
+static int callb(int ok, X509_STORE_CTX *ctx);
static int sign (X509 *x, EVP_PKEY *pkey,int days,int clrext, const EVP_MD *digest,
CONF *conf, char *section);
static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest,
@@ -1279,7 +1276,7 @@ end:
return ret;
}
-static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx)
+static int callb(int ok, X509_STORE_CTX *ctx)
{
int err;
X509 *err_cert;