diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/evp/bio_b64.c | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/evp/bio_b64.c')
-rw-r--r-- | src/lib/libcrypto/evp/bio_b64.c | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c index 73172b9a07..84729119df 100644 --- a/src/lib/libcrypto/evp/bio_b64.c +++ b/src/lib/libcrypto/evp/bio_b64.c | |||
@@ -59,10 +59,9 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include "buffer.h" | 62 | #include <openssl/buffer.h> |
63 | #include "evp.h" | 63 | #include <openssl/evp.h> |
64 | 64 | ||
65 | #ifndef NOPROTO | ||
66 | static int b64_write(BIO *h,char *buf,int num); | 65 | static int b64_write(BIO *h,char *buf,int num); |
67 | static int b64_read(BIO *h,char *buf,int size); | 66 | static int b64_read(BIO *h,char *buf,int size); |
68 | /*static int b64_puts(BIO *h,char *str); */ | 67 | /*static int b64_puts(BIO *h,char *str); */ |
@@ -70,16 +69,6 @@ static int b64_read(BIO *h,char *buf,int size); | |||
70 | static long b64_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 69 | static long b64_ctrl(BIO *h,int cmd,long arg1,char *arg2); |
71 | static int b64_new(BIO *h); | 70 | static int b64_new(BIO *h); |
72 | static int b64_free(BIO *data); | 71 | static int b64_free(BIO *data); |
73 | #else | ||
74 | static int b64_write(); | ||
75 | static int b64_read(); | ||
76 | /*static int b64_puts(); */ | ||
77 | /*static int b64_gets(); */ | ||
78 | static long b64_ctrl(); | ||
79 | static int b64_new(); | ||
80 | static int b64_free(); | ||
81 | #endif | ||
82 | |||
83 | #define B64_BLOCK_SIZE 1024 | 72 | #define B64_BLOCK_SIZE 1024 |
84 | #define B64_BLOCK_SIZE2 768 | 73 | #define B64_BLOCK_SIZE2 768 |
85 | #define B64_NONE 0 | 74 | #define B64_NONE 0 |
@@ -113,13 +102,12 @@ static BIO_METHOD methods_b64= | |||
113 | b64_free, | 102 | b64_free, |
114 | }; | 103 | }; |
115 | 104 | ||
116 | BIO_METHOD *BIO_f_base64() | 105 | BIO_METHOD *BIO_f_base64(void) |
117 | { | 106 | { |
118 | return(&methods_b64); | 107 | return(&methods_b64); |
119 | } | 108 | } |
120 | 109 | ||
121 | static int b64_new(bi) | 110 | static int b64_new(BIO *bi) |
122 | BIO *bi; | ||
123 | { | 111 | { |
124 | BIO_B64_CTX *ctx; | 112 | BIO_B64_CTX *ctx; |
125 | 113 | ||
@@ -140,8 +128,7 @@ BIO *bi; | |||
140 | return(1); | 128 | return(1); |
141 | } | 129 | } |
142 | 130 | ||
143 | static int b64_free(a) | 131 | static int b64_free(BIO *a) |
144 | BIO *a; | ||
145 | { | 132 | { |
146 | if (a == NULL) return(0); | 133 | if (a == NULL) return(0); |
147 | Free(a->ptr); | 134 | Free(a->ptr); |
@@ -151,10 +138,7 @@ BIO *a; | |||
151 | return(1); | 138 | return(1); |
152 | } | 139 | } |
153 | 140 | ||
154 | static int b64_read(b,out,outl) | 141 | static int b64_read(BIO *b, char *out, int outl) |
155 | BIO *b; | ||
156 | char *out; | ||
157 | int outl; | ||
158 | { | 142 | { |
159 | int ret=0,i,ii,j,k,x,n,num,ret_code=0; | 143 | int ret=0,i,ii,j,k,x,n,num,ret_code=0; |
160 | BIO_B64_CTX *ctx; | 144 | BIO_B64_CTX *ctx; |
@@ -354,10 +338,7 @@ int outl; | |||
354 | return((ret == 0)?ret_code:ret); | 338 | return((ret == 0)?ret_code:ret); |
355 | } | 339 | } |
356 | 340 | ||
357 | static int b64_write(b,in,inl) | 341 | static int b64_write(BIO *b, char *in, int inl) |
358 | BIO *b; | ||
359 | char *in; | ||
360 | int inl; | ||
361 | { | 342 | { |
362 | int ret=inl,n,i; | 343 | int ret=inl,n,i; |
363 | BIO_B64_CTX *ctx; | 344 | BIO_B64_CTX *ctx; |
@@ -451,11 +432,7 @@ int inl; | |||
451 | return(ret); | 432 | return(ret); |
452 | } | 433 | } |
453 | 434 | ||
454 | static long b64_ctrl(b,cmd,num,ptr) | 435 | static long b64_ctrl(BIO *b, int cmd, long num, char *ptr) |
455 | BIO *b; | ||
456 | int cmd; | ||
457 | long num; | ||
458 | char *ptr; | ||
459 | { | 436 | { |
460 | BIO_B64_CTX *ctx; | 437 | BIO_B64_CTX *ctx; |
461 | long ret=1; | 438 | long ret=1; |