diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bf_nbio.c')
| -rw-r--r-- | src/lib/libcrypto/bio/bf_nbio.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/bio/bf_nbio.c b/src/lib/libcrypto/bio/bf_nbio.c index 5e574b7231..413ef5c4c5 100644 --- a/src/lib/libcrypto/bio/bf_nbio.c +++ b/src/lib/libcrypto/bio/bf_nbio.c | |||
| @@ -66,14 +66,14 @@ | |||
| 66 | /* BIO_put and BIO_get both add to the digest, | 66 | /* BIO_put and BIO_get both add to the digest, |
| 67 | * BIO_gets returns the digest */ | 67 | * BIO_gets returns the digest */ |
| 68 | 68 | ||
| 69 | static int nbiof_write(BIO *h,char *buf,int num); | 69 | static int nbiof_write(BIO *h,const char *buf,int num); |
| 70 | static int nbiof_read(BIO *h,char *buf,int size); | 70 | static int nbiof_read(BIO *h,char *buf,int size); |
| 71 | static int nbiof_puts(BIO *h,char *str); | 71 | static int nbiof_puts(BIO *h,const char *str); |
| 72 | static int nbiof_gets(BIO *h,char *str,int size); | 72 | static int nbiof_gets(BIO *h,char *str,int size); |
| 73 | static long nbiof_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 73 | static long nbiof_ctrl(BIO *h,int cmd,long arg1,void *arg2); |
| 74 | static int nbiof_new(BIO *h); | 74 | static int nbiof_new(BIO *h); |
| 75 | static int nbiof_free(BIO *data); | 75 | static int nbiof_free(BIO *data); |
| 76 | static long nbiof_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 76 | static long nbiof_callback_ctrl(BIO *h,int cmd,bio_info_cb *fp); |
| 77 | typedef struct nbio_test_st | 77 | typedef struct nbio_test_st |
| 78 | { | 78 | { |
| 79 | /* only set if we sent a 'should retry' error */ | 79 | /* only set if we sent a 'should retry' error */ |
| @@ -104,7 +104,7 @@ static int nbiof_new(BIO *bi) | |||
| 104 | { | 104 | { |
| 105 | NBIO_TEST *nt; | 105 | NBIO_TEST *nt; |
| 106 | 106 | ||
| 107 | nt=(NBIO_TEST *)Malloc(sizeof(NBIO_TEST)); | 107 | nt=(NBIO_TEST *)OPENSSL_malloc(sizeof(NBIO_TEST)); |
| 108 | nt->lrn= -1; | 108 | nt->lrn= -1; |
| 109 | nt->lwn= -1; | 109 | nt->lwn= -1; |
| 110 | bi->ptr=(char *)nt; | 110 | bi->ptr=(char *)nt; |
| @@ -117,7 +117,7 @@ static int nbiof_free(BIO *a) | |||
| 117 | { | 117 | { |
| 118 | if (a == NULL) return(0); | 118 | if (a == NULL) return(0); |
| 119 | if (a->ptr != NULL) | 119 | if (a->ptr != NULL) |
| 120 | Free(a->ptr); | 120 | OPENSSL_free(a->ptr); |
| 121 | a->ptr=NULL; | 121 | a->ptr=NULL; |
| 122 | a->init=0; | 122 | a->init=0; |
| 123 | a->flags=0; | 123 | a->flags=0; |
| @@ -159,7 +159,7 @@ static int nbiof_read(BIO *b, char *out, int outl) | |||
| 159 | return(ret); | 159 | return(ret); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | static int nbiof_write(BIO *b, char *in, int inl) | 162 | static int nbiof_write(BIO *b, const char *in, int inl) |
| 163 | { | 163 | { |
| 164 | NBIO_TEST *nt; | 164 | NBIO_TEST *nt; |
| 165 | int ret=0; | 165 | int ret=0; |
| @@ -204,7 +204,7 @@ static int nbiof_write(BIO *b, char *in, int inl) | |||
| 204 | return(ret); | 204 | return(ret); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | static long nbiof_ctrl(BIO *b, int cmd, long num, char *ptr) | 207 | static long nbiof_ctrl(BIO *b, int cmd, long num, void *ptr) |
| 208 | { | 208 | { |
| 209 | long ret; | 209 | long ret; |
| 210 | 210 | ||
| @@ -226,7 +226,7 @@ static long nbiof_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
| 226 | return(ret); | 226 | return(ret); |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | static long nbiof_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 229 | static long nbiof_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
| 230 | { | 230 | { |
| 231 | long ret=1; | 231 | long ret=1; |
| 232 | 232 | ||
| @@ -247,7 +247,7 @@ static int nbiof_gets(BIO *bp, char *buf, int size) | |||
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | 249 | ||
| 250 | static int nbiof_puts(BIO *bp, char *str) | 250 | static int nbiof_puts(BIO *bp, const char *str) |
| 251 | { | 251 | { |
| 252 | if (bp->next_bio == NULL) return(0); | 252 | if (bp->next_bio == NULL) return(0); |
| 253 | return(BIO_puts(bp->next_bio,str)); | 253 | return(BIO_puts(bp->next_bio,str)); |
