diff options
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/bio_ssl.c | 44 | ||||
-rw-r--r-- | ssl/s23_clnt.c | 14 | ||||
-rw-r--r-- | ssl/s23_lib.c | 26 | ||||
-rw-r--r-- | ssl/s23_meth.c | 5 | ||||
-rw-r--r-- | ssl/s23_pkt.c | 7 | ||||
-rw-r--r-- | ssl/s23_srvr.c | 11 | ||||
-rw-r--r-- | ssl/s2_clnt.c | 43 | ||||
-rw-r--r-- | ssl/s2_enc.c | 13 | ||||
-rw-r--r-- | ssl/s2_lib.c | 53 | ||||
-rw-r--r-- | ssl/s2_meth.c | 5 | ||||
-rw-r--r-- | ssl/s2_pkt.c | 43 | ||||
-rw-r--r-- | ssl/s2_srvr.c | 37 | ||||
-rw-r--r-- | ssl/s3_both.c | 37 | ||||
-rw-r--r-- | ssl/s3_clnt.c | 41 | ||||
-rw-r--r-- | ssl/s3_enc.c | 63 | ||||
-rw-r--r-- | ssl/s3_lib.c | 78 | ||||
-rw-r--r-- | ssl/s3_meth.c | 5 | ||||
-rw-r--r-- | ssl/s3_pkt.c | 56 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 38 | ||||
-rw-r--r-- | ssl/ssl_algs.c | 2 | ||||
-rw-r--r-- | ssl/ssl_asn1.c | 10 | ||||
-rw-r--r-- | ssl/ssl_cert.c | 7 | ||||
-rw-r--r-- | ssl/ssl_ciph.c | 50 | ||||
-rw-r--r-- | ssl/ssl_err.c | 2 | ||||
-rw-r--r-- | ssl/ssl_err2.c | 2 | ||||
-rw-r--r-- | ssl/ssl_lib.c | 2 | ||||
-rw-r--r-- | ssl/ssl_rsa.c | 95 | ||||
-rw-r--r-- | ssl/ssl_sess.c | 86 | ||||
-rw-r--r-- | ssl/ssl_stat.c | 24 | ||||
-rw-r--r-- | ssl/ssl_txt.c | 8 | ||||
-rw-r--r-- | ssl/ssltest.c | 21 | ||||
-rw-r--r-- | ssl/t1_clnt.c | 5 | ||||
-rw-r--r-- | ssl/t1_enc.c | 68 | ||||
-rw-r--r-- | ssl/t1_lib.c | 19 | ||||
-rw-r--r-- | ssl/t1_meth.c | 5 | ||||
-rw-r--r-- | ssl/t1_srvr.c | 5 |
36 files changed, 295 insertions, 735 deletions
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c index 58a6d69b9b..ed08327228 100644 --- a/ssl/bio_ssl.c +++ b/ssl/bio_ssl.c @@ -104,13 +104,12 @@ static BIO_METHOD methods_sslp= ssl_free, }; -BIO_METHOD *BIO_f_ssl() +BIO_METHOD *BIO_f_ssl(void) { return(&methods_sslp); } -static int ssl_new(bi) -BIO *bi; +static int ssl_new(BIO *bi) { BIO_SSL *bs; @@ -127,8 +126,7 @@ BIO *bi; return(1); } -static int ssl_free(a) -BIO *a; +static int ssl_free(BIO *a) { BIO_SSL *bs; @@ -147,10 +145,7 @@ BIO *a; return(1); } -static int ssl_read(b,out,outl) -BIO *b; -char *out; -int outl; +static int ssl_read(BIO *b, char *out, int outl) { int ret=1; BIO_SSL *sb; @@ -234,10 +229,7 @@ int outl; return(ret); } -static int ssl_write(b,out,outl) -BIO *b; -char *out; -int outl; +static int ssl_write(BIO *b, char *out, int outl) { int ret,r=0; int retry_reason=0; @@ -305,11 +297,7 @@ int outl; return(ret); } -static long ssl_ctrl(b,cmd,num,ptr) -BIO *b; -int cmd; -long num; -char *ptr; +static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr) { SSL **sslp,*ssl; BIO_SSL *bs; @@ -483,9 +471,7 @@ char *ptr; return(ret); } -static int ssl_puts(bp,str) -BIO *bp; -char *str; +static int ssl_puts(BIO *bp, char *str) { int n,ret; @@ -494,8 +480,7 @@ char *str; return(ret); } -BIO *BIO_new_buffer_ssl_connect(ctx) -SSL_CTX *ctx; +BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx) { BIO *ret=NULL,*buf=NULL,*ssl=NULL; @@ -512,8 +497,7 @@ err: return(NULL); } -BIO *BIO_new_ssl_connect(ctx) -SSL_CTX *ctx; +BIO *BIO_new_ssl_connect(SSL_CTX *ctx) { BIO *ret=NULL,*con=NULL,*ssl=NULL; @@ -530,9 +514,7 @@ err: return(NULL); } -BIO *BIO_new_ssl(ctx,client) -SSL_CTX *ctx; -int client; +BIO *BIO_new_ssl(SSL_CTX *ctx, int client) { BIO *ret; SSL *ssl; @@ -553,8 +535,7 @@ int client; return(ret); } -int BIO_ssl_copy_session_id(t,f) -BIO *t,*f; +int BIO_ssl_copy_session_id(BIO *t, BIO *f) { t=BIO_find_type(t,BIO_TYPE_SSL); f=BIO_find_type(f,BIO_TYPE_SSL); @@ -567,8 +548,7 @@ BIO *t,*f; return(1); } -void BIO_ssl_shutdown(b) -BIO *b; +void BIO_ssl_shutdown(BIO *b) { SSL *s; diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index c0948fd2da..61c7420135 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -75,8 +75,7 @@ static int ssl23_client_hello(); static int ssl23_get_server_hello(); #endif -static SSL_METHOD *ssl23_get_client_method(ver) -int ver; +static SSL_METHOD *ssl23_get_client_method(int ver) { if (ver == SSL2_VERSION) return(SSLv2_client_method()); @@ -88,7 +87,7 @@ int ver; return(NULL); } -SSL_METHOD *SSLv23_client_method() +SSL_METHOD *SSLv23_client_method(void) { static int init=1; static SSL_METHOD SSLv23_client_data; @@ -104,8 +103,7 @@ SSL_METHOD *SSLv23_client_method() return(&SSLv23_client_data); } -int ssl23_connect(s) -SSL *s; +int ssl23_connect(SSL *s) { BUF_MEM *buf; unsigned long Time=time(NULL); @@ -215,8 +213,7 @@ end: } -static int ssl23_client_hello(s) -SSL *s; +static int ssl23_client_hello(SSL *s) { unsigned char *buf; unsigned char *p,*d; @@ -315,8 +312,7 @@ SSL *s; return(ssl23_write_bytes(s)); } -static int ssl23_get_server_hello(s) -SSL *s; +static int ssl23_get_server_hello(SSL *s) { char buf[8]; unsigned char *p; diff --git a/ssl/s23_lib.c b/ssl/s23_lib.c index 34aa0de4fd..4d58558522 100644 --- a/ssl/s23_lib.c +++ b/ssl/s23_lib.c @@ -105,23 +105,22 @@ static SSL_METHOD SSLv23_data= { &ssl3_undef_enc_method, }; -static long ssl23_default_timeout() +static long ssl23_default_timeout(void) { return(300); } -SSL_METHOD *sslv23_base_method() +SSL_METHOD *sslv23_base_method(void) { return(&SSLv23_data); } -static int ssl23_num_ciphers() +static int ssl23_num_ciphers(void) { return(ssl3_num_ciphers()+ssl2_num_ciphers()); } -static SSL_CIPHER *ssl23_get_cipher(u) -unsigned int u; +static SSL_CIPHER *ssl23_get_cipher(unsigned int u) { unsigned int uu=ssl3_num_ciphers(); @@ -133,8 +132,7 @@ unsigned int u; /* This function needs to check if the ciphers required are actually * available */ -static SSL_CIPHER *ssl23_get_cipher_by_char(p) -const unsigned char *p; +static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) { SSL_CIPHER c,*cp; unsigned long id; @@ -150,9 +148,7 @@ const unsigned char *p; return(cp); } -static int ssl23_put_cipher_by_char(c,p) -const SSL_CIPHER *c; -unsigned char *p; +static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) { long l; @@ -167,10 +163,7 @@ unsigned char *p; return(3); } -static int ssl23_read(s,buf,len) -SSL *s; -char *buf; -int len; +static int ssl23_read(SSL *s, char *buf, int len) { int n; @@ -200,10 +193,7 @@ int len; } } -static int ssl23_write(s,buf,len) -SSL *s; -const char *buf; -int len; +static int ssl23_write(SSL *s, const char *buf, int len) { int n; diff --git a/ssl/s23_meth.c b/ssl/s23_meth.c index bbda4ff182..edcbdbb2bd 100644 --- a/ssl/s23_meth.c +++ b/ssl/s23_meth.c @@ -66,8 +66,7 @@ static SSL_METHOD *ssl23_get_method(int ver); static SSL_METHOD *ssl23_get_method(); #endif -static SSL_METHOD *ssl23_get_method(ver) -int ver; +static SSL_METHOD *ssl23_get_method(int ver) { if (ver == SSL2_VERSION) return(SSLv23_method()); @@ -79,7 +78,7 @@ int ver; return(NULL); } -SSL_METHOD *SSLv23_method() +SSL_METHOD *SSLv23_method(void) { static int init=1; static SSL_METHOD SSLv23_data; diff --git a/ssl/s23_pkt.c b/ssl/s23_pkt.c index 99f909d50f..64acf2ce7d 100644 --- a/ssl/s23_pkt.c +++ b/ssl/s23_pkt.c @@ -63,8 +63,7 @@ #include "buffer.h" #include "ssl_locl.h" -int ssl23_write_bytes(s) -SSL *s; +int ssl23_write_bytes(SSL *s) { int i,num,tot; char *buf; @@ -91,9 +90,7 @@ SSL *s; } /* only return when we have read 'n' bytes */ -int ssl23_read_bytes(s,n) -SSL *s; -int n; +int ssl23_read_bytes(SSL *s, int n) { unsigned char *p; int j; diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index fa132166bd..8dc0a0608f 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -73,8 +73,7 @@ static SSL_METHOD *ssl23_get_server_method(); int ssl23_get_client_hello(); #endif -static SSL_METHOD *ssl23_get_server_method(ver) -int ver; +static SSL_METHOD *ssl23_get_server_method(int ver) { if (ver == SSL2_VERSION) return(SSLv2_server_method()); @@ -86,7 +85,7 @@ int ver; return(NULL); } -SSL_METHOD *SSLv23_server_method() +SSL_METHOD *SSLv23_server_method(void) { static int init=1; static SSL_METHOD SSLv23_server_data; @@ -102,8 +101,7 @@ SSL_METHOD *SSLv23_server_method() return(&SSLv23_server_data); } -int ssl23_accept(s) -SSL *s; +int ssl23_accept(SSL *s) { BUF_MEM *buf; unsigned long Time=time(NULL); @@ -194,8 +192,7 @@ end: } -int ssl23_get_client_hello(s) -SSL *s; +int ssl23_get_client_hello(SSL *s) { char buf_space[8]; char *buf= &(buf_space[0]); diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index 8c3cbde177..5652549dac 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -88,8 +88,7 @@ static int ssl_rsa_public_encrypt(); #define BREAK break -static SSL_METHOD *ssl2_get_client_method(ver) -int ver; +static SSL_METHOD *ssl2_get_client_method(int ver) { if (ver == SSL2_VERSION) return(SSLv2_client_method()); @@ -97,7 +96,7 @@ int ver; return(NULL); } -SSL_METHOD *SSLv2_client_method() +SSL_METHOD *SSLv2_client_method(void) { static int init=1; static SSL_METHOD SSLv2_client_data; @@ -113,8 +112,7 @@ SSL_METHOD *SSLv2_client_method() return(&SSLv2_client_data); } -int ssl2_connect(s) -SSL *s; +int ssl2_connect(SSL *s) { unsigned long l=time(NULL); BUF_MEM *buf=NULL; @@ -296,8 +294,7 @@ end: return(ret); } -static int get_server_hello(s) -SSL *s; +static int get_server_hello(SSL *s) { unsigned char *buf; unsigned char *p; @@ -461,8 +458,7 @@ SSL *s; return(1); } -static int client_hello(s) -SSL *s; +static int client_hello(SSL *s) { unsigned char *buf; unsigned char *p,*d; @@ -529,8 +525,7 @@ SSL *s; return(ssl2_do_write(s)); } -static int client_master_key(s) -SSL *s; +static int client_master_key(SSL *s) { unsigned char *buf; unsigned char *p,*d; @@ -615,8 +610,7 @@ SSL *s; return(ssl2_do_write(s)); } -static int client_finished(s) -SSL *s; +static int client_finished(SSL *s) { unsigned char *p; @@ -634,8 +628,7 @@ SSL *s; } /* read the data and then respond */ -static int client_certificate(s) -SSL *s; +static int client_certificate(SSL *s) { unsigned char *buf; unsigned char *p,*d; @@ -779,8 +772,7 @@ SSL *s; return(ssl2_do_write(s)); } -static int get_server_verify(s) -SSL *s; +static int get_server_verify(SSL *s) { unsigned char *p; int i; @@ -823,8 +815,7 @@ SSL *s; return(1); } -static int get_server_finished(s) -SSL *s; +static int get_server_finished(SSL *s) { unsigned char *buf; unsigned char *p; @@ -889,11 +880,7 @@ SSL *s; } /* loads in the certificate from the server */ -int ssl2_set_certificate(s, type, len, data) -SSL *s; -int type; -int len; -unsigned char *data; +int ssl2_set_certificate(SSL *s, int type, int len, unsigned char *data) { STACK_OF(X509) *sk=NULL; EVP_PKEY *pkey=NULL; @@ -963,12 +950,8 @@ err: return(ret); } -static int ssl_rsa_public_encrypt(c, len, from, to, padding) -CERT *c; -int len; -unsigned char *from; -unsigned char *to; -int padding; +static int ssl_rsa_public_encrypt(CERT *c, int len, unsigned char *from, + unsigned char *to, int padding) { EVP_PKEY *pkey=NULL; int i= -1; diff --git a/ssl/s2_enc.c b/ssl/s2_enc.c index af12dc472f..09835008a9 100644 --- a/ssl/s2_enc.c +++ b/ssl/s2_enc.c @@ -59,9 +59,7 @@ #include <stdio.h> #include "ssl_locl.h" -int ssl2_enc_init(s, client) -SSL *s; -int client; +int ssl2_enc_init(SSL *s, int client) { /* Max number of bytes needed */ EVP_CIPHER_CTX *rs,*ws; @@ -114,9 +112,7 @@ err: /* read/writes from s->s2->mac_data using length for encrypt and * decrypt. It sets the s->s2->padding, s->[rw]length and * s->s2->pad_data ptr if we are encrypting */ -void ssl2_enc(s,send) -SSL *s; -int send; +void ssl2_enc(SSL *s, int send) { EVP_CIPHER_CTX *ds; unsigned long l; @@ -146,10 +142,7 @@ int send; EVP_Cipher(ds,s->s2->mac_data,s->s2->mac_data,l); } -void ssl2_mac(s, md,send) -SSL *s; -unsigned char *md; -int send; +void ssl2_mac(SSL *s, unsigned char *md, int send) { EVP_MD_CTX c; unsigned char sequence[4],*p,*sec,*act; diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index 7241ea2cf9..43c7cab3ed 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -196,23 +196,22 @@ static SSL_METHOD SSLv2_data= { &ssl3_undef_enc_method, }; -static long ssl2_default_timeout() +static long ssl2_default_timeout(void) { return(300); } -SSL_METHOD *sslv2_base_method() +SSL_METHOD *sslv2_base_method(void) { return(&SSLv2_data); } -int ssl2_num_ciphers() +int ssl2_num_ciphers(void) { return(SSL2_NUM_CIPHERS); } -SSL_CIPHER *ssl2_get_cipher(u) -unsigned int u; +SSL_CIPHER *ssl2_get_cipher(unsigned int u) { if (u < SSL2_NUM_CIPHERS) return(&(ssl2_ciphers[SSL2_NUM_CIPHERS-1-u])); @@ -220,14 +219,12 @@ unsigned int u; return(NULL); } -int ssl2_pending(s) -SSL *s; +int ssl2_pending(SSL *s) { return(s->s2->ract_data_length); } -int ssl2_new(s) -SSL *s; +int ssl2_new(SSL *s) { SSL2_CTX *s2; @@ -252,8 +249,7 @@ err: return(0); } -void ssl2_free(s) -SSL *s; +void ssl2_free(SSL *s) { SSL2_CTX *s2; @@ -268,8 +264,7 @@ SSL *s; s->s2=NULL; } -void ssl2_clear(s) -SSL *s; +void ssl2_clear(SSL *s) { SSL2_CTX *s2; unsigned char *rbuf,*wbuf; @@ -289,11 +284,7 @@ SSL *s; s->packet_length=0; } -long ssl2_ctrl(s,cmd,larg,parg) -SSL *s; -int cmd; -long larg; -char *parg; +long ssl2_ctrl(SSL *s, int cmd, long larg, char *parg) { int ret=0; @@ -308,19 +299,14 @@ char *parg; return(ret); } -long ssl2_ctx_ctrl(ctx,cmd,larg,parg) -SSL_CTX *ctx; -int cmd; -long larg; -char *parg; +long ssl2_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg) { return(0); } /* This function needs to check if the ciphers required are actually * available */ -SSL_CIPHER *ssl2_get_cipher_by_char(p) -const unsigned char *p; +SSL_CIPHER *ssl2_get_cipher_by_char(const unsigned char *p) { static int init=1; static SSL_CIPHER *sorted[SSL2_NUM_CIPHERS]; @@ -353,9 +339,7 @@ const unsigned char *p; return(*cpp); } -int ssl2_put_cipher_by_char(c,p) -const SSL_CIPHER *c; -unsigned char *p; +int ssl2_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) { long l; @@ -370,8 +354,7 @@ unsigned char *p; return(3); } -void ssl2_generate_key_material(s) -SSL *s; +void ssl2_generate_key_material(SSL *s) { unsigned int i; MD5_CTX ctx; @@ -393,9 +376,7 @@ SSL *s; } } -void ssl2_return_error(s,err) -SSL *s; -int err; +void ssl2_return_error(SSL *s, int err) { if (!s->error) { @@ -407,8 +388,7 @@ int err; } -void ssl2_write_error(s) -SSL *s; +void ssl2_write_error(SSL *s) { char buf[3]; int i,error; @@ -431,8 +411,7 @@ SSL *s; s->error=0; */ } -int ssl2_shutdown(s) -SSL *s; +int ssl2_shutdown(SSL *s) { s->shutdown=(SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); return(1); diff --git a/ssl/s2_meth.c b/ssl/s2_meth.c index f28c9162cf..7d7eed8a8f 100644 --- a/ssl/s2_meth.c +++ b/ssl/s2_meth.c @@ -66,8 +66,7 @@ static SSL_METHOD *ssl2_get_method(int ver); static SSL_METHOD *ssl2_get_method(); #endif -static SSL_METHOD *ssl2_get_method(ver) -int ver; +static SSL_METHOD *ssl2_get_method(int ver) { if (ver == SSL2_VERSION) return(SSLv2_method()); @@ -75,7 +74,7 @@ int ver; return(NULL); } -SSL_METHOD *SSLv2_method() +SSL_METHOD *SSLv2_method(void) { static int init=1; static SSL_METHOD SSLv2_data; diff --git a/ssl/s2_pkt.c b/ssl/s2_pkt.c index e1b13ccf65..89fe9dabb1 100644 --- a/ssl/s2_pkt.c +++ b/ssl/s2_pkt.c @@ -80,10 +80,7 @@ static int write_pending(); static int ssl_mt_error(); #endif -int ssl2_peek(s,buf,len) -SSL *s; -char *buf; -int len; +int ssl2_peek(SSL *s, char *buf, int len) { int ret; @@ -99,10 +96,7 @@ int len; /* SSL_read - * This routine will return 0 to len bytes, decrypted etc if required. */ -int ssl2_read(s, buf, len) -SSL *s; -char *buf; -int len; +int ssl2_read(SSL *s, char *buf, int len) { int n; unsigned char mac[MAX_MAC_SIZE]; @@ -252,11 +246,8 @@ int len; } } -static int read_n(s, n, max, extend) -SSL *s; -unsigned int n; -unsigned int max; -unsigned int extend; +static int read_n(SSL *s, unsigned int n, unsigned int max, + unsigned int extend) { int i,off,newb; @@ -354,10 +345,7 @@ unsigned int extend; return(n); } -int ssl2_write(s, buf, len) -SSL *s; -const char *buf; -int len; +int ssl2_write(SSL *s, const char *buf, int len) { unsigned int n,tot; int i; @@ -403,10 +391,7 @@ int len; } } -static int write_pending(s,buf,len) -SSL *s; -const char *buf; -unsigned int len; +static int write_pending(SSL *s, const char *buf, unsigned int len) { int i; @@ -451,10 +436,7 @@ unsigned int len; } } -static int do_ssl_write(s, buf, len) -SSL *s; -const char *buf; -unsigned int len; +static int do_ssl_write(SSL *s, const char *buf, unsigned int len) { unsigned int j,k,olen,p,mac_size,bs; register unsigned char *pp; @@ -575,10 +557,7 @@ unsigned int len; return(write_pending(s,buf,olen)); } -int ssl2_part_read(s,f,i) -SSL *s; -unsigned long f; -int i; +int ssl2_part_read(SSL *s, unsigned long f, int i) { unsigned char *p; int j; @@ -608,8 +587,7 @@ int i; } } -int ssl2_do_write(s) -SSL *s; +int ssl2_do_write(SSL *s) { int ret; @@ -624,8 +602,7 @@ SSL *s; return(0); } -static int ssl_mt_error(n) -int n; +static int ssl_mt_error(int n) { int ret; diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index c058b522bc..83621290fb 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -88,8 +88,7 @@ static int ssl_rsa_private_decrypt(); #define BREAK break -static SSL_METHOD *ssl2_get_server_method(ver) -int ver; +static SSL_METHOD *ssl2_get_server_method(int ver) { if (ver == SSL2_VERSION) return(SSLv2_server_method()); @@ -97,7 +96,7 @@ int ver; return(NULL); } -SSL_METHOD *SSLv2_server_method() +SSL_METHOD *SSLv2_server_method(void) { static int init=1; static SSL_METHOD SSLv2_server_data; @@ -113,8 +112,7 @@ SSL_METHOD *SSLv2_server_method() return(&SSLv2_server_data); } -int ssl2_accept(s) -SSL *s; +int ssl2_accept(SSL *s) { unsigned long l=time(NULL); BUF_MEM *buf=NULL; @@ -334,8 +332,7 @@ end: return(ret); } -static int get_client_master_key(s) -SSL *s; +static int get_client_master_key(SSL *s) { int export,i,n,keya,ek; unsigned char *p; @@ -460,8 +457,7 @@ SSL *s; return(1); } -static int get_client_hello(s) -SSL *s; +static int get_client_hello(SSL *s) { int i,n; unsigned char *p; @@ -603,8 +599,7 @@ mem_err: return(0); } -static int server_hello(s) -SSL *s; +static int server_hello(SSL *s) { unsigned char *p,*d; int n,hit; @@ -694,8 +689,7 @@ SSL *s; return(ssl2_do_write(s)); } -static int get_client_finished(s) -SSL *s; +static int get_client_finished(SSL *s) { unsigned char *p; int i; @@ -737,8 +731,7 @@ SSL *s; return(1); } -static int server_verify(s) -SSL *s; +static int server_verify(SSL *s) { unsigned char *p; @@ -756,8 +749,7 @@ SSL *s; return(ssl2_do_write(s)); } -static int server_finish(s) -SSL *s; +static int server_finish(SSL *s) { unsigned char *p; @@ -780,8 +772,7 @@ SSL *s; } /* send the request and check the response */ -static int request_certificate(s) -SSL *s; +static int request_certificate(SSL *s) { unsigned char *p,*p2,*buf2; unsigned char *ccd; @@ -938,12 +929,8 @@ end: return(ret); } -static int ssl_rsa_private_decrypt(c, len, from, to,padding) -CERT *c; -int len; -unsigned char *from; -unsigned char *to; -int padding; +static int ssl_rsa_private_decrypt(CERT *c, int len, unsigned char *from, + unsigned char *to, int padding) { RSA *rsa; int i; diff --git a/ssl/s3_both.c b/ssl/s3_both.c index c3d660ff33..d5f8c464ba 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -69,12 +69,8 @@ /* SSL3err(SSL_F_SSL3_GET_FINISHED,SSL_R_EXCESSIVE_MESSAGE_SIZE); */ -int ssl3_send_finished(s,a,b,sender,slen) -SSL *s; -int a; -int b; -unsigned char *sender; -int slen; +int ssl3_send_finished(SSL *s, int a, int b, unsigned char *sender, + int slen) { unsigned char *p,*d; int i; @@ -111,10 +107,7 @@ int slen; return(ssl3_do_write(s,SSL3_RT_HANDSHAKE)); } -int ssl3_get_finished(s,a,b) -SSL *s; -int a; -int b; +int ssl3_get_finished(SSL *s, int a, int b) { int al,i,ok; long n; @@ -174,9 +167,7 @@ f_err: * ssl->session->read_compression assign * ssl->session->read_hash assign */ -int ssl3_send_change_cipher_spec(s,a,b) -SSL *s; -int a,b; +int ssl3_send_change_cipher_spec(SSL *s, int a, int b) { unsigned char *p; @@ -194,9 +185,7 @@ int a,b; return(ssl3_do_write(s,SSL3_RT_CHANGE_CIPHER_SPEC)); } -unsigned long ssl3_output_cert_chain(s,x) -SSL *s; -X509 *x; +unsigned long ssl3_output_cert_chain(SSL *s, X509 *x) { unsigned char *p; int n,i; @@ -271,11 +260,7 @@ X509 *x; return(l); } -long ssl3_get_message(s,st1,stn,mt,max,ok) -SSL *s; -int st1,stn,mt; -long max; -int *ok; +long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) { unsigned char *p; unsigned long l; @@ -356,9 +341,7 @@ err: return(-1); } -int ssl_cert_type(x,pkey) -X509 *x; -EVP_PKEY *pkey; +int ssl_cert_type(X509 *x, EVP_PKEY *pkey) { EVP_PKEY *pk; int ret= -1,i,j; @@ -408,8 +391,7 @@ err: return(ret); } -int ssl_verify_alarm_type(type) -long type; +int ssl_verify_alarm_type(long type) |