summaryrefslogtreecommitdiffstats
path: root/crypto/bio
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/bio.h16
-rw-r--r--crypto/bio/bio_cb.c2
-rw-r--r--crypto/bio/bio_lib.c22
3 files changed, 18 insertions, 22 deletions
diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h
index 299dadfb3f..ea5323d20f 100644
--- a/crypto/bio/bio.h
+++ b/crypto/bio/bio.h
@@ -252,11 +252,9 @@ void BIO_clear_flags(BIO *b, int flags);
#define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN))
#define BIO_cb_post(a) ((a)&BIO_CB_RETURN)
-long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
- size_t, long, long);
-void BIO_set_callback(BIO *b, long (*callback)(struct bio_st *, int,
- const char *, size_t, long,
- long));
+long (*BIO_get_callback(const BIO *b)) (struct bio_st *,int,const char *,int, long,long);
+void BIO_set_callback(BIO *b,
+ long (*callback)(struct bio_st *,int,const char *,int, long,long));
char *BIO_get_callback_arg(const BIO *b);
void BIO_set_callback_arg(BIO *b, char *arg);
@@ -283,7 +281,7 @@ struct bio_st
{
BIO_METHOD *method;
/* bio, mode, argp, argi, argl, ret */
- long (*callback)(struct bio_st *,int,const char *,size_t, long,long);
+ long (*callback)(struct bio_st *,int,const char *,int, long,long);
char *cb_arg; /* first argument for the callback */
int init;
@@ -573,7 +571,7 @@ int BIO_free(BIO *a);
void BIO_vfree(BIO *a);
int BIO_read(BIO *b, void *data, int len);
int BIO_gets(BIO *bp,char *buf, int size);
-int BIO_write(BIO *b, const void *data, size_t len);
+int BIO_write(BIO *b, const void *data, int len);
int BIO_puts(BIO *bp,const char *buf);
int BIO_indent(BIO *b,int indent,int max);
long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg);
@@ -594,8 +592,8 @@ int BIO_nread(BIO *bio, char **buf, int num);
int BIO_nwrite0(BIO *bio, char **buf);
int BIO_nwrite(BIO *bio, char **buf, int num);
-long BIO_debug_callback(BIO *bio, int cmd, const char *argp, size_t argi,
- long argl, long ret);
+long BIO_debug_callback(BIO *bio,int cmd,const char *argp,int argi,
+ long argl,long ret);
BIO_METHOD *BIO_s_mem(void);
BIO *BIO_new_mem_buf(void *buf, int len);
diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c
index 5d310dd1c7..9bcbc321d9 100644
--- a/crypto/bio/bio_cb.c
+++ b/crypto/bio/bio_cb.c
@@ -64,7 +64,7 @@
#include <openssl/err.h>
long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
- size_t argi, long argl, long ret)
+ int argi, long argl, long ret)
{
BIO *b;
MS_STATIC char buf[256];
diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c
index ea7f22a8ce..3f52ae953c 100644
--- a/crypto/bio/bio_lib.c
+++ b/crypto/bio/bio_lib.c
@@ -156,14 +156,12 @@ void BIO_set_flags(BIO *b, int flags)
b->flags |= flags;
}
-long (*BIO_get_callback(const BIO *b))(struct bio_st *, int, const char *,
- size_t, long, long)
+long (*BIO_get_callback(const BIO *b))(struct bio_st *,int,const char *,int, long,long)
{
return b->callback;
}
-void BIO_set_callback(BIO *b, long (*cb)(struct bio_st *, int, const char *,
- size_t, long, long))
+void BIO_set_callback(BIO *b, long (*cb)(struct bio_st *,int,const char *,int, long,long))
{
b->callback = cb;
}
@@ -192,7 +190,7 @@ int BIO_method_type(const BIO *b)
int BIO_read(BIO *b, void *out, int outl)
{
int i;
- long (*cb)(BIO *, int, const char *, size_t, long, long);
+ long (*cb)(BIO *,int,const char *,int,long,long);
if ((b == NULL) || (b->method == NULL) || (b->method->bread == NULL))
{
@@ -221,10 +219,10 @@ int BIO_read(BIO *b, void *out, int outl)
return(i);
}
-int BIO_write(BIO *b, const void *in, size_t inl)
+int BIO_write(BIO *b, const void *in, int inl)
{
int i;
- long (*cb)(BIO *,int,const char *,size_t,long,long);
+ long (*cb)(BIO *,int,const char *,int,long,long);
if (b == NULL)
return(0);
@@ -237,7 +235,7 @@ int BIO_write(BIO *b, const void *in, size_t inl)
}
if ((cb != NULL) &&
- ((i=cb(b,BIO_CB_WRITE,in,inl,0L,1L)) <= 0))
+ ((i=(int)cb(b,BIO_CB_WRITE,in,inl,0L,1L)) <= 0))
return(i);
if (!b->init)
@@ -259,7 +257,7 @@ int BIO_write(BIO *b, const void *in, size_t inl)
int BIO_puts(BIO *b, const char *in)
{
int i;
- long (*cb)(BIO *, int, const char *, size_t, long, long);
+ long (*cb)(BIO *,int,const char *,int,long,long);
if ((b == NULL) || (b->method == NULL) || (b->method->bputs == NULL))
{
@@ -292,7 +290,7 @@ int BIO_puts(BIO *b, const char *in)
int BIO_gets(BIO *b, char *in, int inl)
{
int i;
- long (*cb)(BIO *, int, const char *, size_t, long, long);
+ long (*cb)(BIO *,int,const char *,int,long,long);
if ((b == NULL) || (b->method == NULL) || (b->method->bgets == NULL))
{
@@ -353,7 +351,7 @@ char *BIO_ptr_ctrl(BIO *b, int cmd, long larg)
long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
{
long ret;
- long (*cb)(BIO *, int, const char *, size_t, long, long);
+ long (*cb)(BIO *,int,const char *,int,long,long);
if (b == NULL) return(0);
@@ -380,7 +378,7 @@ long BIO_ctrl(BIO *b, int cmd, long larg, void *parg)
long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, long))
{
long ret;
- long (*cb)(BIO *, int, const char *, size_t, long, long);
+ long (*cb)(BIO *,int,const char *,int,long,long);
if (b == NULL) return(0);