summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/asn1pars.c2
-rw-r--r--apps/ca.c2
-rw-r--r--apps/ciphers.c2
-rw-r--r--apps/crl.c2
-rw-r--r--apps/crl2p7.c2
-rw-r--r--apps/dgst.c3
-rw-r--r--apps/dh.c2
-rw-r--r--apps/dhparam.c2
-rw-r--r--apps/dsa.c2
-rw-r--r--apps/dsaparam.c3
-rw-r--r--apps/enc.c2
-rw-r--r--apps/errstr.c2
-rw-r--r--apps/gendh.c3
-rw-r--r--apps/gendsa.c2
-rw-r--r--apps/genrsa.c3
-rw-r--r--apps/nseq.c1
-rw-r--r--apps/pkcs12.c3
-rw-r--r--apps/pkcs7.c2
-rw-r--r--apps/pkcs8.c1
-rw-r--r--apps/req.c2
-rw-r--r--apps/rsa.c2
-rw-r--r--apps/s_client.c2
-rw-r--r--apps/s_server.c2
-rw-r--r--apps/s_time.c2
-rw-r--r--apps/sess_id.c3
-rw-r--r--apps/smime.c2
-rw-r--r--apps/speed.c2
-rw-r--r--apps/spkac.c2
-rw-r--r--apps/verify.c2
-rw-r--r--apps/version.c2
-rw-r--r--apps/x509.c2
-rw-r--r--crypto/asn1/asn1.h1
-rw-r--r--crypto/bf/bf_enc.c6
-rw-r--r--crypto/bf/bf_skey.c2
-rw-r--r--crypto/bn/bntest.c2
-rw-r--r--crypto/crypto.h6
-rw-r--r--crypto/mem.c2
-rw-r--r--crypto/mem_dbg.c2
-rw-r--r--crypto/x509v3/v3_info.c2
-rw-r--r--crypto/x509v3/x509v3.h2
40 files changed, 80 insertions, 11 deletions
diff --git a/apps/asn1pars.c b/apps/asn1pars.c
index ac1e20dc04..f104ebc1f0 100644
--- a/apps/asn1pars.c
+++ b/apps/asn1pars.c
@@ -80,6 +80,8 @@
#undef PROG
#define PROG asn1parse_main
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int i,badops=0,offset=0,ret=1,j;
diff --git a/apps/ca.c b/apps/ca.c
index 8696b41571..6a27a6de15 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -213,6 +213,8 @@ static char *section=NULL;
static int preserve=0;
static int msie_hack=0;
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
char *key=NULL;
diff --git a/apps/ciphers.c b/apps/ciphers.c
index 4baa0c3c8e..f8e9e7be2e 100644
--- a/apps/ciphers.c
+++ b/apps/ciphers.c
@@ -77,6 +77,8 @@ static char *ciphers_usage[]={
NULL
};
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int ret=1,i;
diff --git a/apps/crl.c b/apps/crl.c
index d91eb7fd80..338f46d97c 100644
--- a/apps/crl.c
+++ b/apps/crl.c
@@ -93,6 +93,8 @@ NULL
static X509_CRL *load_crl(char *file, int format);
static BIO *bio_out=NULL;
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
X509_CRL *x=NULL;
diff --git a/apps/crl2p7.c b/apps/crl2p7.c
index 8514be2a4f..4056591676 100644
--- a/apps/crl2p7.c
+++ b/apps/crl2p7.c
@@ -82,6 +82,8 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile);
* -out arg - output file - default stdout
*/
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int i,badops=0;
diff --git a/apps/dgst.c b/apps/dgst.c
index 5f0506ed8c..1b56d6ef44 100644
--- a/apps/dgst.c
+++ b/apps/dgst.c
@@ -74,6 +74,9 @@
#define PROG dgst_main
void do_fp(unsigned char *buf,BIO *f,int sep);
+
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
unsigned char *buf=NULL;
diff --git a/apps/dh.c b/apps/dh.c
index becbdb6671..b3c20e2b5c 100644
--- a/apps/dh.c
+++ b/apps/dh.c
@@ -82,6 +82,8 @@
* -C
*/
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
DH *dh=NULL;
diff --git a/apps/dhparam.c b/apps/dhparam.c
index 5b769b7f31..293a400d0c 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -86,6 +86,8 @@
static void MS_CALLBACK dh_cb(int p, int n, void *arg);
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
DH *dh=NULL;
diff --git a/apps/dsa.c b/apps/dsa.c
index 6198ea94ea..a94bc95058 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -83,6 +83,8 @@
* -modulus - print the DSA public key
*/
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int ret=1;
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index 9fc5697c2e..4d4e1ad2b5 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -85,6 +85,9 @@
*/
static void MS_CALLBACK dsa_cb(int p, int n, void *arg);
+
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
DSA *dsa=NULL;
diff --git a/apps/enc.c b/apps/enc.c
index 0beb6377d7..387cfe2f19 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -80,6 +80,8 @@ int set_hex(char *in,unsigned char *out,int size);
#define BSIZE (8*1024)
#define PROG enc_main
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
static const char magic[]="Salted__";
diff --git a/apps/errstr.c b/apps/errstr.c
index c86b5d940b..4650379589 100644
--- a/apps/errstr.c
+++ b/apps/errstr.c
@@ -68,6 +68,8 @@
#undef PROG
#define PROG errstr_main
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int i,ret=0;
diff --git a/apps/gendh.c b/apps/gendh.c
index 3986117594..1f6be96599 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -75,6 +75,9 @@
#define PROG gendh_main
static void MS_CALLBACK dh_cb(int p, int n, void *arg);
+
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
DH *dh=NULL;
diff --git a/apps/gendsa.c b/apps/gendsa.c
index 0c56b1410a..805f114516 100644
--- a/apps/gendsa.c
+++ b/apps/gendsa.c
@@ -73,6 +73,8 @@
#undef PROG
#define PROG gendsa_main
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
DSA *dsa=NULL;
diff --git a/apps/genrsa.c b/apps/genrsa.c
index 63fd45ee98..a20cd30092 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -75,6 +75,9 @@
#define PROG genrsa_main
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg);
+
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int ret=1;
diff --git a/apps/nseq.c b/apps/nseq.c
index 4a921396f9..cc88d50ceb 100644
--- a/apps/nseq.c
+++ b/apps/nseq.c
@@ -65,6 +65,7 @@
#undef PROG
#define PROG nseq_main
+int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index dd008c468a..a54555b467 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -86,6 +86,9 @@ int print_attribs(BIO *out, STACK_OF(X509_ATTRIBUTE) *attrlst, char *name);
void hex_prin(BIO *out, unsigned char *buf, int len);
int alg_print(BIO *x, X509_ALGOR *alg);
int cert_load(BIO *in, STACK_OF(X509) *sk);
+
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
char *infile=NULL, *outfile=NULL, *keyname = NULL;
diff --git a/apps/pkcs7.c b/apps/pkcs7.c
index d7feafd2f5..f471cc77fd 100644
--- a/apps/pkcs7.c
+++ b/apps/pkcs7.c
@@ -78,6 +78,8 @@
* -print_certs
*/
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
PKCS7 *p7=NULL;
diff --git a/apps/pkcs8.c b/apps/pkcs8.c
index cb55464f21..e3fa7d4bad 100644
--- a/apps/pkcs8.c
+++ b/apps/pkcs8.c
@@ -66,6 +66,7 @@
#include "apps.h"
#define PROG pkcs8_main
+int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
diff --git a/apps/req.c b/apps/req.c
index ce42611bfb..14e8ef5a4f 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -136,6 +136,8 @@ static LHASH *req_conf=NULL;
#define TYPE_DSA 2
#define TYPE_DH 3
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
#ifndef NO_DSA
diff --git a/apps/rsa.c b/apps/rsa.c
index 1313ddc3e3..879b7ab522 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -86,6 +86,8 @@
* -pubout - Output a public key.
*/
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int ret=1;
diff --git a/apps/s_client.c b/apps/s_client.c
index fc3e398cb4..ac19f4eed9 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -153,6 +153,8 @@ static void sc_usage(void)
}
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int off=0;
diff --git a/apps/s_server.c b/apps/s_server.c
index 044d4c448d..a92db5cd1b 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -397,6 +397,8 @@ static int ebcdic_puts(BIO *bp, char *str)
}
#endif
+int MAIN(int, char **);
+
int MAIN(int argc, char *argv[])
{
short port=PORT;
diff --git a/apps/s_time.c b/apps/s_time.c
index 4f42681feb..39fd3b8b4d 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -388,6 +388,8 @@ static double tm_Time_F(int s)
* MAIN - main processing area for client
* real name depends on MONOLITH
*/
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
double totalTime = 0.0;
diff --git a/apps/sess_id.c b/apps/sess_id.c
index 3d363d13eb..71d5aa0b7c 100644
--- a/apps/sess_id.c
+++ b/apps/sess_id.c
@@ -84,6 +84,9 @@ NULL
};
static SSL_SESSION *load_sess_id(char *file, int format);
+
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
SSL_SESSION *x=NULL;
diff --git a/apps/smime.c b/apps/smime.c
index 95bda8388f..9c84841168 100644
--- a/apps/smime.c
+++ b/apps/smime.c
@@ -80,6 +80,8 @@ static int save_certs(char *signerfile, STACK_OF(X509) *signers);
#define SMIME_VERIFY 4
#define SMIME_PK7OUT 5
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int operation = 0;
diff --git a/apps/speed.c b/apps/speed.c
index c4fd79f884..b3130def8b 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -238,6 +238,8 @@ static double Time_F(int s)
#endif
}
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
unsigned char *buf=NULL,*buf2=NULL;
diff --git a/apps/spkac.c b/apps/spkac.c
index e3f434d24c..e26a95d0fc 100644
--- a/apps/spkac.c
+++ b/apps/spkac.c
@@ -75,6 +75,8 @@
* -out arg - output file - default stdout
*/
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int i,badops=0, ret = 1;
diff --git a/apps/verify.c b/apps/verify.c
index a69c5d88f8..df596ca042 100644
--- a/apps/verify.c
+++ b/apps/verify.c
@@ -74,6 +74,8 @@ static int check(X509_STORE *ctx,char *file, STACK_OF(X509)*other, int purpose);
static STACK_OF(X509) *load_untrusted(char *file);
static int v_verbose=0;
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int i,ret=1;
diff --git a/apps/version.c b/apps/version.c
index a567f34094..f5c9adc254 100644
--- a/apps/version.c
+++ b/apps/version.c
@@ -66,6 +66,8 @@
#undef PROG
#define PROG version_main
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int i,ret=0;
diff --git a/apps/x509.c b/apps/x509.c
index 56e227160e..1e9072676a 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -141,6 +141,8 @@ static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest,
static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt);
static int reqfile=0;
+int MAIN(int, char **);
+
int MAIN(int argc, char **argv)
{
int ret=1;
diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h
index da41317fc9..ad5ea3d171 100644
--- a/crypto/asn1/asn1.h
+++ b/crypto/asn1/asn1.h
@@ -786,6 +786,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
const unsigned char *in, int inlen, int inform, int nid);
ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
+int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
void ASN1_STRING_TABLE_cleanup(void);
/* BEGIN ERROR CODES */
diff --git a/crypto/bf/bf_enc.c b/crypto/bf/bf_enc.c
index a43361f433..b380acf959 100644
--- a/crypto/bf/bf_enc.c
+++ b/crypto/bf/bf_enc.c
@@ -72,7 +72,8 @@ to modify the code.
void BF_encrypt(BF_LONG *data, const BF_KEY *key)
{
#ifndef BF_PTR2
- register BF_LONG l,r,*p,*s;
+ register BF_LONG l,r;
+ const register BF_LONG *p,*s;
p=key->P;
s= &(key->S[0]);
@@ -148,7 +149,8 @@ void BF_encrypt(BF_LONG *data, const BF_KEY *key)
void BF_decrypt(BF_LONG *data, const BF_KEY *key)
{
#ifndef BF_PTR2
- register BF_LONG l,r,*p,*s;
+ register BF_LONG l,r;
+ const register BF_LONG *p,*s;
p=key->P;
s= &(key->S[0]);
diff --git a/crypto/bf/bf_skey.c b/crypto/bf/bf_skey.c
index 4fb869b129..4d6a232fe0 100644
--- a/crypto/bf/bf_skey.c
+++ b/crypto/bf/bf_skey.c
@@ -66,7 +66,7 @@ void BF_set_key(BF_KEY *key, int len, const unsigned char *data)
{
int i;
BF_LONG *p,ri,in[2];
- unsigned char *d,*end;
+ const unsigned char *d,*end;
memcpy((char *)key,(char *)&bf_init,sizeof(BF_KEY));
diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c
index cec21646da..9276a079d0 100644
--- a/crypto/bn/bntest.c
+++ b/crypto/bn/bntest.c
@@ -104,7 +104,7 @@ static unsigned char lst[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8
static const char rnd_seed[] = "string to make the random number generator think it has entropy";
-void message(BIO *out, char *m)
+static void message(BIO *out, char *m)
{
fprintf(stderr, "test %s\n", m);
#if defined(linux) || defined(FreeBSD) /* can we use GNU bc features? */
diff --git a/crypto/crypto.h b/crypto/crypto.h
index f58ebc4a73..33a3c79d02 100644
--- a/crypto/crypto.h
+++ b/crypto/crypto.h
@@ -310,7 +310,7 @@ void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
void CRYPTO_set_mem_debug_options(long bits);
-long CRYPTO_get_mem_debug_options();
+long CRYPTO_get_mem_debug_options(void);
#define CRYPTO_push_info(info) \
CRYPTO_push_info_(info, __FILE__, __LINE__);
@@ -336,7 +336,7 @@ void CRYPTO_dbg_free(void *addr,int before_p);
* 3: 1 + 2
*/
void CRYPTO_dbg_set_options(long bits);
-long CRYPTO_dbg_get_options();
+long CRYPTO_dbg_get_options(void);
#ifndef NO_FP_API
void CRYPTO_mem_leaks_fp(FILE *);
@@ -345,7 +345,7 @@ void CRYPTO_mem_leaks(struct bio_st *bio);
/* unsigned long order, char *file, int line, int num_bytes, char *addr */
void CRYPTO_mem_leaks_cb(void (*cb)());
-void ERR_load_CRYPTO_strings(void );
+void ERR_load_CRYPTO_strings(void);
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
diff --git a/crypto/mem.c b/crypto/mem.c
index dac3d2685c..5a661e5f45 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -253,7 +253,7 @@ void CRYPTO_set_mem_debug_options(long bits)
set_debug_options_func(bits);
}
-long CRYPTO_get_mem_debug_options()
+long CRYPTO_get_mem_debug_options(void)
{
if (get_debug_options_func != NULL)
return get_debug_options_func();
diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c
index ad5297bc01..14770c0733 100644
--- a/crypto/mem_dbg.c
+++ b/crypto/mem_dbg.c
@@ -214,7 +214,7 @@ void CRYPTO_dbg_set_options(long bits)
options = bits;
}
-long CRYPTO_dbg_get_options()
+long CRYPTO_dbg_get_options(void)
{
return options;
}
diff --git a/crypto/x509v3/v3_info.c b/crypto/x509v3/v3_info.c
index 6e3588aab8..78d2135046 100644
--- a/crypto/x509v3/v3_info.c
+++ b/crypto/x509v3/v3_info.c
@@ -207,7 +207,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a)
Free (a);
}
-STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new()
+STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void)
{
return sk_ACCESS_DESCRIPTION_new(NULL);
}
diff --git a/crypto/x509v3/x509v3.h b/crypto/x509v3/x509v3.h
index 83998d0bc1..a6d2392127 100644
--- a/crypto/x509v3/x509v3.h
+++ b/crypto/x509v3/x509v3.h
@@ -462,7 +462,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a);
ACCESS_DESCRIPTION *d2i_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION **a, unsigned char **pp,
long length);
-STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new();
+STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void);
void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a);
STACK_OF(ACCESS_DESCRIPTION) *d2i_AUTHORITY_INFO_ACCESS(STACK_OF(ACCESS_DESCRIPTION) **a,
unsigned char **pp, long length);