diff options
author | Ben Laurie <ben@openssl.org> | 1999-04-23 15:01:15 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-04-23 15:01:15 +0000 |
commit | 61f5b6f33807306d09bccbc2dcad474d1d04ca40 (patch) | |
tree | 1680fa648df5f730df11ec433a512a1fadf0facd | |
parent | 779cc0bca98e35830db455f34b986b86a2d2f822 (diff) |
Work with -pedantic!
78 files changed, 1040 insertions, 880 deletions
@@ -88,7 +88,7 @@ my %table=( # Our development configs "purify", "purify gcc:-g -DPURIFY -Wall:-lsocket -lnsl::::", "debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:-lefence::::", -"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -O2 -Wall -Wshadow -Werror -pipe:::::", +"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -O2 -pedantic -Wall -Wshadow -Werror -pipe:::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe:::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_elf_asm", "dist", "cc:-O:::::", diff --git a/apps/pkcs12.c b/apps/pkcs12.c index 266bfa89ab..97b7c88ef9 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -78,9 +78,9 @@ EVP_CIPHER *enc; #ifndef NOPROTO int get_cert_chain(X509 *cert, STACK **chain); -int dump_certs_keys_p12(BIO *out, PKCS12 *p12, unsigned char *pass, int passlen, int options); -int dump_certs_pkeys_bags(BIO *out, STACK *bags, unsigned char *pass, int passlen, int options); -int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, unsigned char *pass, int passlen, int options); +int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options); +int dump_certs_pkeys_bags(BIO *out, STACK *bags, char *pass, int passlen, int options); +int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, char *pass, int passlen, int options); int print_attribs(BIO *out, STACK *attrlst, char *name); void hex_prin(BIO *out, unsigned char *buf, int len); int alg_print(BIO *x, X509_ALGOR *alg); @@ -274,7 +274,7 @@ if (export_cert) { char *catmp; int i, pmatch = 0; unsigned char keyid[EVP_MAX_MD_SIZE]; - int keyidlen; + unsigned int keyidlen; /* Get private key so we can match it to a certificate */ key = PEM_read_bio_PrivateKey(inkey ? inkey : in, NULL, NULL); if (!inkey) BIO_reset(in); @@ -452,7 +452,7 @@ int dump_cert_text (BIO *out, X509 *x) return 0; } -int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, unsigned char *pass, +int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, int passlen, int options) { STACK *asafes, *bags; @@ -485,7 +485,7 @@ int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, unsigned char *pass, return 1; } -int dump_certs_pkeys_bags (BIO *out, STACK *bags, unsigned char *pass, +int dump_certs_pkeys_bags (BIO *out, STACK *bags, char *pass, int passlen, int options) { int i; @@ -497,7 +497,7 @@ int dump_certs_pkeys_bags (BIO *out, STACK *bags, unsigned char *pass, return 1; } -int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, unsigned char *pass, +int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, char *pass, int passlen, int options) { EVP_PKEY *pkey; diff --git a/apps/s_server.c b/apps/s_server.c index 1257ac527e..f026fa1b6b 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -76,8 +76,8 @@ #ifndef NOPROTO static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export,int keylength); -static int sv_body(char *hostname, int s, char *context); -static int www_body(char *hostname, int s, char *context); +static int sv_body(char *hostname, int s, unsigned char *context); +static int www_body(char *hostname, int s, unsigned char *context); static void close_accept_socket(void ); static void sv_usage(void); static int init_ssl_connection(SSL *s); @@ -556,7 +556,7 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx) SSL_CTX_sess_get_cache_size(ssl_ctx)); } -static int sv_body(char *hostname, int s, char *context) +static int sv_body(char *hostname, int s, unsigned char *context) { char *buf=NULL; fd_set readfds; @@ -586,7 +586,8 @@ static int sv_body(char *hostname, int s, char *context) if (con == NULL) { con=(SSL *)SSL_new(ctx); if(context) - SSL_set_session_id_context(con, context, strlen(context)); + SSL_set_session_id_context(con, context, + strlen((char *)context)); } SSL_clear(con); @@ -871,7 +872,7 @@ static int load_CA(SSL_CTX *ctx, char *file) } #endif -static int www_body(char *hostname, int s, char *context) +static int www_body(char *hostname, int s, unsigned char *context) { char *buf=NULL; int ret=1; @@ -904,7 +905,8 @@ static int www_body(char *hostname, int s, char *context) if (!BIO_set_write_buffer_size(io,bufsize)) goto err; if ((con=(SSL *)SSL_new(ctx)) == NULL) goto err; - if(context) SSL_set_session_id_context(con, context, strlen(context)); + if(context) SSL_set_session_id_context(con, context, + strlen((char *)context)); sbio=BIO_new_socket(s,BIO_NOCLOSE); if (s_nbio_test) diff --git a/apps/s_socket.c b/apps/s_socket.c index 9c08ec0985..2c83dbb607 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -209,7 +209,7 @@ int init_client_ip(int *sock, unsigned char ip[4], int port) int nbio_sock_error(int sock) { int j,i; - unsigned int size; + int size; size=sizeof(int); i=getsockopt(sock,SOL_SOCKET,SO_ERROR,(char *)&j,&size); @@ -360,7 +360,7 @@ int do_accept(int acc_sock, int *sock, char **host) int ret,i; struct hostent *h1,*h2; static struct sockaddr_in from; - unsigned int len; + int len; /* struct linger ling; */ if (!sock_init()) return(0); diff --git a/crypto/Makefile.ssl b/crypto/Makefile.ssl index 8cb6f2eb90..9e4df74f9e 100644 --- a/crypto/Makefile.ssl +++ b/crypto/Makefile.ssl @@ -39,8 +39,8 @@ LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o tmdiff.o $(ERRC).o SRC= $(LIBSRC) -EXHEADER= crypto.h cryptall.h tmdiff.h opensslv.h -HEADER= cryptlib.h date.h opensslconf.h $(EXHEADER) +EXHEADER= crypto.h cryptall.h tmdiff.h opensslv.h opensslconf.h +HEADER= cryptlib.h date.h $(EXHEADER) ALL= $(GENERAL) $(SRC) $(HEADER) diff --git a/crypto/asn1/Makefile.ssl b/crypto/asn1/Makefile.ssl index 7b6256e365..c6e1f2f8a4 100644 --- a/crypto/asn1/Makefile.ssl +++ b/crypto/asn1/Makefile.ssl @@ -122,13 +122,13 @@ $(ERRC).c: $(ERR).err a_bitstr.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_bitstr.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_bitstr.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_bitstr.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_bmp.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_bmp.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_bmp.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_bmp.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_bool.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_bool.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_bool.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_bool.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_bytes.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_bytes.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_bytes.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -138,7 +138,8 @@ a_bytes.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_bytes.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_bytes.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_bytes.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_bytes.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h asn1_mac.h +a_bytes.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h +a_bytes.o: asn1_mac.h a_d2i_fp.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_d2i_fp.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_d2i_fp.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -148,7 +149,8 @@ a_d2i_fp.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_d2i_fp.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_d2i_fp.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_d2i_fp.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_d2i_fp.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h asn1_mac.h +a_d2i_fp.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h +a_d2i_fp.o: asn1_mac.h a_digest.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_digest.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_digest.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -158,7 +160,7 @@ a_digest.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_digest.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_digest.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_digest.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_digest.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_digest.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_dup.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_dup.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_dup.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -168,13 +170,14 @@ a_dup.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_dup.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_dup.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_dup.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_dup.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h asn1_mac.h +a_dup.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h +a_dup.o: asn1_mac.h a_enum.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_enum.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_enum.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_enum.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_gentm.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_gentm.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_gentm.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_gentm.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_hdr.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_hdr.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_hdr.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -184,7 +187,8 @@ a_hdr.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_hdr.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_hdr.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_hdr.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_hdr.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h asn1_mac.h +a_hdr.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h +a_hdr.o: asn1_mac.h a_i2d_fp.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_i2d_fp.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_i2d_fp.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -194,10 +198,11 @@ a_i2d_fp.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_i2d_fp.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_i2d_fp.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_i2d_fp.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_i2d_fp.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h asn1_mac.h +a_i2d_fp.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h +a_i2d_fp.o: asn1_mac.h a_int.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_int.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_int.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_int.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_meth.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_meth.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_meth.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -207,17 +212,17 @@ a_meth.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_meth.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_meth.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_meth.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_meth.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_meth.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_object.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_object.o: ../../include/e_os.h ../../include/err.h ../../include/objects.h -a_object.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslv.h -a_object.o: asn1.h +a_object.o: ../../include/stack.h ../cryptlib.h ../crypto.h ../opensslconf.h +a_object.o: ../opensslv.h asn1.h a_octet.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_octet.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_octet.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_octet.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_print.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_print.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_print.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_print.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_set.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_set.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_set.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -227,7 +232,8 @@ a_set.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_set.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_set.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_set.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_set.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h asn1_mac.h +a_set.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h +a_set.o: asn1_mac.h a_sign.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_sign.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_sign.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -237,10 +243,10 @@ a_sign.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_sign.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_sign.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_sign.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_sign.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_sign.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_time.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_time.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_time.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_time.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_type.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_type.o: ../../include/buffer.h ../../include/cast.h ../../include/des.h a_type.o: ../../include/dh.h ../../include/dsa.h ../../include/e_os.h @@ -250,13 +256,14 @@ a_type.o: ../../include/objects.h ../../include/pkcs7.h ../../include/rc2.h a_type.o: ../../include/rc4.h ../../include/rc5.h ../../include/ripemd.h a_type.o: ../../include/rsa.h ../../include/safestack.h ../../include/sha.h a_type.o: ../../include/stack.h ../../include/x509.h ../../include/x509_vfy.h -a_type.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h asn1_mac.h +a_type.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h +a_type.o: asn1_mac.h a_utctm.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_utctm.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_utctm.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_utctm.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_utf8.o: ../../include/bio.h ../../include/bn.h ../../include/buffer.h a_utf8.o: ../../include/e_os.h ../../include/err.h ../../include/stack.h -a_utf8.o: ../cryptlib.h ../crypto.h ../opensslv.h asn1.h +a_utf8.o: ../cryptlib.h ../crypto.h ../opensslconf.h ../opensslv.h asn1.h a_verify.o: ../../include/bio.h ../../include/blowfish.h ../../include/bn.h a_verify.o: ../../include/buffer.h ../../includ |