summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bio_ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/bio_ssl.c')
-rw-r--r--src/lib/libssl/bio_ssl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c
index d73c41adcd..d85555a7e6 100644
--- a/src/lib/libssl/bio_ssl.c
+++ b/src/lib/libssl/bio_ssl.c
@@ -65,13 +65,13 @@
65#include <openssl/err.h> 65#include <openssl/err.h>
66#include <openssl/ssl.h> 66#include <openssl/ssl.h>
67 67
68static int ssl_write(BIO *h,char *buf,int num); 68static int ssl_write(BIO *h, const char *buf, int num);
69static int ssl_read(BIO *h,char *buf,int size); 69static int ssl_read(BIO *h, char *buf, int size);
70static int ssl_puts(BIO *h,char *str); 70static int ssl_puts(BIO *h, const char *str);
71static long ssl_ctrl(BIO *h,int cmd,long arg1,char *arg2); 71static long ssl_ctrl(BIO *h, int cmd, long arg1, void *arg2);
72static int ssl_new(BIO *h); 72static int ssl_new(BIO *h);
73static int ssl_free(BIO *data); 73static int ssl_free(BIO *data);
74static long ssl_callback_ctrl(BIO *h,int cmd,void (*fp)()); 74static long ssl_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
75typedef struct bio_ssl_st 75typedef struct bio_ssl_st
76 { 76 {
77 SSL *ssl; /* The ssl handle :-) */ 77 SSL *ssl; /* The ssl handle :-) */
@@ -105,7 +105,7 @@ static int ssl_new(BIO *bi)
105 { 105 {
106 BIO_SSL *bs; 106 BIO_SSL *bs;
107 107
108 bs=(BIO_SSL *)Malloc(sizeof(BIO_SSL)); 108 bs=(BIO_SSL *)OPENSSL_malloc(sizeof(BIO_SSL));
109 if (bs == NULL) 109 if (bs == NULL)
110 { 110 {
111 BIOerr(BIO_F_SSL_NEW,ERR_R_MALLOC_FAILURE); 111 BIOerr(BIO_F_SSL_NEW,ERR_R_MALLOC_FAILURE);
@@ -133,7 +133,7 @@ static int ssl_free(BIO *a)
133 a->flags=0; 133 a->flags=0;
134 } 134 }
135 if (a->ptr != NULL) 135 if (a->ptr != NULL)
136 Free(a->ptr); 136 OPENSSL_free(a->ptr);
137 return(1); 137 return(1);
138 } 138 }
139 139
@@ -221,7 +221,7 @@ static int ssl_read(BIO *b, char *out, int outl)
221 return(ret); 221 return(ret);
222 } 222 }
223 223
224static int ssl_write(BIO *b, char *out, int outl) 224static int ssl_write(BIO *b, const char *out, int outl)
225 { 225 {
226 int ret,r=0; 226 int ret,r=0;
227 int retry_reason=0; 227 int retry_reason=0;
@@ -289,7 +289,7 @@ static int ssl_write(BIO *b, char *out, int outl)
289 return(ret); 289 return(ret);
290 } 290 }
291 291
292static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr) 292static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr)
293 { 293 {
294 SSL **sslp,*ssl; 294 SSL **sslp,*ssl;
295 BIO_SSL *bs; 295 BIO_SSL *bs;
@@ -470,7 +470,7 @@ static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr)
470 return(ret); 470 return(ret);
471 } 471 }
472 472
473static long ssl_callback_ctrl(BIO *b, int cmd, void (*fp)()) 473static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
474 { 474 {
475 SSL *ssl; 475 SSL *ssl;
476 BIO_SSL *bs; 476 BIO_SSL *bs;
@@ -492,7 +492,7 @@ static long ssl_callback_ctrl(BIO *b, int cmd, void (*fp)())
492 return(ret); 492 return(ret);
493 } 493 }
494 494
495static int ssl_puts(BIO *bp, char *str) 495static int ssl_puts(BIO *bp, const char *str)
496 { 496 {
497 int n,ret; 497 int n,ret;
498 498