summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bf_nbio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/bf_nbio.c')
-rw-r--r--src/lib/libcrypto/bio/bf_nbio.c20
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
69static int nbiof_write(BIO *h,char *buf,int num); 69static int nbiof_write(BIO *h,const char *buf,int num);
70static int nbiof_read(BIO *h,char *buf,int size); 70static int nbiof_read(BIO *h,char *buf,int size);
71static int nbiof_puts(BIO *h,char *str); 71static int nbiof_puts(BIO *h,const char *str);
72static int nbiof_gets(BIO *h,char *str,int size); 72static int nbiof_gets(BIO *h,char *str,int size);
73static long nbiof_ctrl(BIO *h,int cmd,long arg1,char *arg2); 73static long nbiof_ctrl(BIO *h,int cmd,long arg1,void *arg2);
74static int nbiof_new(BIO *h); 74static int nbiof_new(BIO *h);
75static int nbiof_free(BIO *data); 75static int nbiof_free(BIO *data);
76static long nbiof_callback_ctrl(BIO *h,int cmd,void (*fp)()); 76static long nbiof_callback_ctrl(BIO *h,int cmd,bio_info_cb *fp);
77typedef struct nbio_test_st 77typedef 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
162static int nbiof_write(BIO *b, char *in, int inl) 162static 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
207static long nbiof_ctrl(BIO *b, int cmd, long num, char *ptr) 207static 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
229static long nbiof_callback_ctrl(BIO *b, int cmd, void (*fp)()) 229static 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
250static int nbiof_puts(BIO *bp, char *str) 250static 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));