diff options
Diffstat (limited to 'src/lib/libcrypto/evp/bio_enc.c')
-rw-r--r-- | src/lib/libcrypto/evp/bio_enc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/libcrypto/evp/bio_enc.c b/src/lib/libcrypto/evp/bio_enc.c index 629bf4b95d..831c71a2b5 100644 --- a/src/lib/libcrypto/evp/bio_enc.c +++ b/src/lib/libcrypto/evp/bio_enc.c | |||
@@ -62,14 +62,14 @@ | |||
62 | #include <openssl/buffer.h> | 62 | #include <openssl/buffer.h> |
63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
64 | 64 | ||
65 | static int enc_write(BIO *h,char *buf,int num); | 65 | static int enc_write(BIO *h, const char *buf, int num); |
66 | static int enc_read(BIO *h,char *buf,int size); | 66 | static int enc_read(BIO *h, char *buf, int size); |
67 | /*static int enc_puts(BIO *h,char *str); */ | 67 | /*static int enc_puts(BIO *h, const char *str); */ |
68 | /*static int enc_gets(BIO *h,char *str,int size); */ | 68 | /*static int enc_gets(BIO *h, char *str, int size); */ |
69 | static long enc_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 69 | static long enc_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
70 | static int enc_new(BIO *h); | 70 | static int enc_new(BIO *h); |
71 | static int enc_free(BIO *data); | 71 | static int enc_free(BIO *data); |
72 | static long enc_callback_ctrl(BIO *h,int cmd,void (*fp)()); | 72 | static long enc_callback_ctrl(BIO *h, int cmd, bio_info_cb *fps); |
73 | #define ENC_BLOCK_SIZE (1024*4) | 73 | #define ENC_BLOCK_SIZE (1024*4) |
74 | 74 | ||
75 | typedef struct enc_struct | 75 | typedef struct enc_struct |
@@ -105,7 +105,7 @@ static int enc_new(BIO *bi) | |||
105 | { | 105 | { |
106 | BIO_ENC_CTX *ctx; | 106 | BIO_ENC_CTX *ctx; |
107 | 107 | ||
108 | ctx=(BIO_ENC_CTX *)Malloc(sizeof(BIO_ENC_CTX)); | 108 | ctx=(BIO_ENC_CTX *)OPENSSL_malloc(sizeof(BIO_ENC_CTX)); |
109 | EVP_CIPHER_CTX_init(&ctx->cipher); | 109 | EVP_CIPHER_CTX_init(&ctx->cipher); |
110 | if (ctx == NULL) return(0); | 110 | if (ctx == NULL) return(0); |
111 | 111 | ||
@@ -129,7 +129,7 @@ static int enc_free(BIO *a) | |||
129 | b=(BIO_ENC_CTX *)a->ptr; | 129 | b=(BIO_ENC_CTX *)a->ptr; |
130 | EVP_CIPHER_CTX_cleanup(&(b->cipher)); | 130 | EVP_CIPHER_CTX_cleanup(&(b->cipher)); |
131 | memset(a->ptr,0,sizeof(BIO_ENC_CTX)); | 131 | memset(a->ptr,0,sizeof(BIO_ENC_CTX)); |
132 | Free(a->ptr); | 132 | OPENSSL_free(a->ptr); |
133 | a->ptr=NULL; | 133 | a->ptr=NULL; |
134 | a->init=0; | 134 | a->init=0; |
135 | a->flags=0; | 135 | a->flags=0; |
@@ -224,7 +224,7 @@ static int enc_read(BIO *b, char *out, int outl) | |||
224 | return((ret == 0)?ctx->cont:ret); | 224 | return((ret == 0)?ctx->cont:ret); |
225 | } | 225 | } |
226 | 226 | ||
227 | static int enc_write(BIO *b, char *in, int inl) | 227 | static int enc_write(BIO *b, const char *in, int inl) |
228 | { | 228 | { |
229 | int ret=0,n,i; | 229 | int ret=0,n,i; |
230 | BIO_ENC_CTX *ctx; | 230 | BIO_ENC_CTX *ctx; |
@@ -279,7 +279,7 @@ static int enc_write(BIO *b, char *in, int inl) | |||
279 | return(ret); | 279 | return(ret); |
280 | } | 280 | } |
281 | 281 | ||
282 | static long enc_ctrl(BIO *b, int cmd, long num, char *ptr) | 282 | static long enc_ctrl(BIO *b, int cmd, long num, void *ptr) |
283 | { | 283 | { |
284 | BIO *dbio; | 284 | BIO *dbio; |
285 | BIO_ENC_CTX *ctx,*dctx; | 285 | BIO_ENC_CTX *ctx,*dctx; |
@@ -370,7 +370,7 @@ again: | |||
370 | return(ret); | 370 | return(ret); |
371 | } | 371 | } |
372 | 372 | ||
373 | static long enc_callback_ctrl(BIO *b, int cmd, void (*fp)()) | 373 | static long enc_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) |
374 | { | 374 | { |
375 | long ret=1; | 375 | long ret=1; |
376 | 376 | ||