summaryrefslogtreecommitdiff
path: root/ssl/s3_pkt.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-04-23 15:01:15 +0000
committerBen Laurie <ben@openssl.org>1999-04-23 15:01:15 +0000
commit61f5b6f33807306d09bccbc2dcad474d1d04ca40 (patch)
tree1680fa648df5f730df11ec433a512a1fadf0facd /ssl/s3_pkt.c
parent779cc0bca98e35830db455f34b986b86a2d2f822 (diff)
downloadopenssl-new-61f5b6f33807306d09bccbc2dcad474d1d04ca40.tar.gz
Work with -pedantic!
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r--ssl/s3_pkt.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 6e581e1ab1..468831ae86 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -94,8 +94,9 @@
*/
#ifndef NOPROTO
-static int do_ssl3_write(SSL *s, int type, const char *buf, unsigned int len);
-static int ssl3_write_pending(SSL *s, int type, const char *buf,
+static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
+ unsigned int len);
+static int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
unsigned int len);
static int ssl3_get_record(SSL *s);
static int do_compress(SSL *ssl);
@@ -468,8 +469,9 @@ static int do_compress(SSL *ssl)
/* Call this to write data
* It will return <= 0 if not all data has been sent or non-blocking IO.
*/
-int ssl3_write_bytes(SSL *s, int type, const char *buf, int len)
+int ssl3_write_bytes(SSL *s, int type, const void *_buf, int len)
{
+ const unsigned char *buf=_buf;
unsigned int tot,n,nw;
int i;
@@ -513,8 +515,8 @@ int ssl3_write_bytes(SSL *s, int type, const char *buf, int len)
}
}
-static int do_ssl3_write(SSL *s, int type, const char *buf,
- unsigned int len)
+static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
+ unsigned int len)
{
unsigned char *p,*plen;
int i,mac_size,clear=0;
@@ -628,8 +630,8 @@ err:
}
/* if s->s3->wbuf.left != 0, we need to call this */
-static int ssl3_write_pending(SSL *s, int type, const char *buf,
- unsigned int len)
+static int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
+ unsigned int len)
{
int i;
@@ -669,7 +671,7 @@ static int ssl3_write_pending(SSL *s, int type, const char *buf,
}
}
-int ssl3_read_bytes(SSL *s, int type, char *buf, int len)
+int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len)
{
int al,i,j,n,ret;
SSL3_RECORD *rr;
@@ -1009,8 +1011,8 @@ int ssl3_do_write(SSL *s, int type)
{
int ret;
- ret=ssl3_write_bytes(s,type,(char *)
- &(s->init_buf->data[s->init_off]),s->init_num);
+ ret=ssl3_write_bytes(s,type,&s->init_buf->data[s->init_off],
+ s->init_num);
if (ret == s->init_num)
return(1);
if (ret < 0) return(-1);
@@ -1043,7 +1045,7 @@ int ssl3_dispatch_alert(SSL *s)
void (*cb)()=NULL;
s->s3->alert_dispatch=0;
- i=do_ssl3_write(s,SSL3_RT_ALERT,&(s->s3->send_alert[0]),2);
+ i=do_ssl3_write(s,SSL3_RT_ALERT,&s->s3->send_alert[0],2);
if (i <= 0)
{
s->s3->alert_dispatch=1;