diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bf_null.c')
-rw-r--r-- | src/lib/libcrypto/bio/bf_null.c | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/src/lib/libcrypto/bio/bf_null.c b/src/lib/libcrypto/bio/bf_null.c index a47a65741a..3254a55dce 100644 --- a/src/lib/libcrypto/bio/bf_null.c +++ b/src/lib/libcrypto/bio/bf_null.c | |||
@@ -59,13 +59,12 @@ | |||
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 "bio.h" | 62 | #include <openssl/bio.h> |
63 | #include "evp.h" | 63 | #include <openssl/evp.h> |
64 | 64 | ||
65 | /* BIO_put and BIO_get both add to the digest, | 65 | /* BIO_put and BIO_get both add to the digest, |
66 | * BIO_gets returns the digest */ | 66 | * BIO_gets returns the digest */ |
67 | 67 | ||
68 | #ifndef NOPROTO | ||
69 | static int nullf_write(BIO *h,char *buf,int num); | 68 | static int nullf_write(BIO *h,char *buf,int num); |
70 | static int nullf_read(BIO *h,char *buf,int size); | 69 | static int nullf_read(BIO *h,char *buf,int size); |
71 | static int nullf_puts(BIO *h,char *str); | 70 | static int nullf_puts(BIO *h,char *str); |
@@ -73,16 +72,6 @@ static int nullf_gets(BIO *h,char *str,int size); | |||
73 | static long nullf_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 72 | static long nullf_ctrl(BIO *h,int cmd,long arg1,char *arg2); |
74 | static int nullf_new(BIO *h); | 73 | static int nullf_new(BIO *h); |
75 | static int nullf_free(BIO *data); | 74 | static int nullf_free(BIO *data); |
76 | #else | ||
77 | static int nullf_write(); | ||
78 | static int nullf_read(); | ||
79 | static int nullf_puts(); | ||
80 | static int nullf_gets(); | ||
81 | static long nullf_ctrl(); | ||
82 | static int nullf_new(); | ||
83 | static int nullf_free(); | ||
84 | #endif | ||
85 | |||
86 | static BIO_METHOD methods_nullf= | 75 | static BIO_METHOD methods_nullf= |
87 | { | 76 | { |
88 | BIO_TYPE_NULL_FILTER, | 77 | BIO_TYPE_NULL_FILTER, |
@@ -96,13 +85,12 @@ static BIO_METHOD methods_nullf= | |||
96 | nullf_free, | 85 | nullf_free, |
97 | }; | 86 | }; |
98 | 87 | ||
99 | BIO_METHOD *BIO_f_null() | 88 | BIO_METHOD *BIO_f_null(void) |
100 | { | 89 | { |
101 | return(&methods_nullf); | 90 | return(&methods_nullf); |
102 | } | 91 | } |
103 | 92 | ||
104 | static int nullf_new(bi) | 93 | static int nullf_new(BIO *bi) |
105 | BIO *bi; | ||
106 | { | 94 | { |
107 | bi->init=1; | 95 | bi->init=1; |
108 | bi->ptr=NULL; | 96 | bi->ptr=NULL; |
@@ -110,8 +98,7 @@ BIO *bi; | |||
110 | return(1); | 98 | return(1); |
111 | } | 99 | } |
112 | 100 | ||
113 | static int nullf_free(a) | 101 | static int nullf_free(BIO *a) |
114 | BIO *a; | ||
115 | { | 102 | { |
116 | if (a == NULL) return(0); | 103 | if (a == NULL) return(0); |
117 | /* a->ptr=NULL; | 104 | /* a->ptr=NULL; |
@@ -120,10 +107,7 @@ BIO *a; | |||
120 | return(1); | 107 | return(1); |
121 | } | 108 | } |
122 | 109 | ||
123 | static int nullf_read(b,out,outl) | 110 | static int nullf_read(BIO *b, char *out, int outl) |
124 | BIO *b; | ||
125 | char *out; | ||
126 | int outl; | ||
127 | { | 111 | { |
128 | int ret=0; | 112 | int ret=0; |
129 | 113 | ||
@@ -135,10 +119,7 @@ int outl; | |||
135 | return(ret); | 119 | return(ret); |
136 | } | 120 | } |
137 | 121 | ||
138 | static int nullf_write(b,in,inl) | 122 | static int nullf_write(BIO *b, char *in, int inl) |
139 | BIO *b; | ||
140 | char *in; | ||
141 | int inl; | ||
142 | { | 123 | { |
143 | int ret=0; | 124 | int ret=0; |
144 | 125 | ||
@@ -150,11 +131,7 @@ int inl; | |||
150 | return(ret); | 131 | return(ret); |
151 | } | 132 | } |
152 | 133 | ||
153 | static long nullf_ctrl(b,cmd,num,ptr) | 134 | static long nullf_ctrl(BIO *b, int cmd, long num, char *ptr) |
154 | BIO *b; | ||
155 | int cmd; | ||
156 | long num; | ||
157 | char *ptr; | ||
158 | { | 135 | { |
159 | long ret; | 136 | long ret; |
160 | 137 | ||
@@ -175,19 +152,14 @@ char *ptr; | |||
175 | return(ret); | 152 | return(ret); |
176 | } | 153 | } |
177 | 154 | ||
178 | static int nullf_gets(bp,buf,size) | 155 | static int nullf_gets(BIO *bp, char *buf, int size) |
179 | BIO *bp; | ||
180 | char *buf; | ||
181 | int size; | ||
182 | { | 156 | { |
183 | if (bp->next_bio == NULL) return(0); | 157 | if (bp->next_bio == NULL) return(0); |
184 | return(BIO_gets(bp->next_bio,buf,size)); | 158 | return(BIO_gets(bp->next_bio,buf,size)); |
185 | } | 159 | } |
186 | 160 | ||
187 | 161 | ||
188 | static int nullf_puts(bp,str) | 162 | static int nullf_puts(BIO *bp, char *str) |
189 | BIO *bp; | ||
190 | char *str; | ||
191 | { | 163 | { |
192 | if (bp->next_bio == NULL) return(0); | 164 | if (bp->next_bio == NULL) return(0); |
193 | return(BIO_puts(bp->next_bio,str)); | 165 | return(BIO_puts(bp->next_bio,str)); |