diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bio_lib.c')
-rw-r--r-- | src/lib/libcrypto/bio/bio_lib.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libcrypto/bio/bio_lib.c b/src/lib/libcrypto/bio/bio_lib.c index 0be56aacde..86ccbdc202 100644 --- a/src/lib/libcrypto/bio/bio_lib.c +++ b/src/lib/libcrypto/bio/bio_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio_lib.c,v 1.22 2015/02/10 11:22:21 jsing Exp $ */ | 1 | /* $OpenBSD: bio_lib.c,v 1.23 2017/01/29 17:49:22 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -71,7 +71,7 @@ BIO_new(BIO_METHOD *method) | |||
71 | 71 | ||
72 | ret = malloc(sizeof(BIO)); | 72 | ret = malloc(sizeof(BIO)); |
73 | if (ret == NULL) { | 73 | if (ret == NULL) { |
74 | BIOerr(BIO_F_BIO_NEW, ERR_R_MALLOC_FAILURE); | 74 | BIOerror(ERR_R_MALLOC_FAILURE); |
75 | return (NULL); | 75 | return (NULL); |
76 | } | 76 | } |
77 | if (!BIO_set(ret, method)) { | 77 | if (!BIO_set(ret, method)) { |
@@ -200,7 +200,7 @@ BIO_read(BIO *b, void *out, int outl) | |||
200 | long (*cb)(BIO *, int, const char *, int, long, long); | 200 | long (*cb)(BIO *, int, const char *, int, long, long); |
201 | 201 | ||
202 | if ((b == NULL) || (b->method == NULL) || (b->method->bread == NULL)) { | 202 | if ((b == NULL) || (b->method == NULL) || (b->method->bread == NULL)) { |
203 | BIOerr(BIO_F_BIO_READ, BIO_R_UNSUPPORTED_METHOD); | 203 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
204 | return (-2); | 204 | return (-2); |
205 | } | 205 | } |
206 | 206 | ||
@@ -210,7 +210,7 @@ BIO_read(BIO *b, void *out, int outl) | |||
210 | return (i); | 210 | return (i); |
211 | 211 | ||
212 | if (!b->init) { | 212 | if (!b->init) { |
213 | BIOerr(BIO_F_BIO_READ, BIO_R_UNINITIALIZED); | 213 | BIOerror(BIO_R_UNINITIALIZED); |
214 | return (-2); | 214 | return (-2); |
215 | } | 215 | } |
216 | 216 | ||
@@ -236,7 +236,7 @@ BIO_write(BIO *b, const void *in, int inl) | |||
236 | 236 | ||
237 | cb = b->callback; | 237 | cb = b->callback; |
238 | if ((b->method == NULL) || (b->method->bwrite == NULL)) { | 238 | if ((b->method == NULL) || (b->method->bwrite == NULL)) { |
239 | BIOerr(BIO_F_BIO_WRITE, BIO_R_UNSUPPORTED_METHOD); | 239 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
240 | return (-2); | 240 | return (-2); |
241 | } | 241 | } |
242 | 242 | ||
@@ -245,7 +245,7 @@ BIO_write(BIO *b, const void *in, int inl) | |||
245 | return (i); | 245 | return (i); |
246 | 246 | ||
247 | if (!b->init) { | 247 | if (!b->init) { |
248 | BIOerr(BIO_F_BIO_WRITE, BIO_R_UNINITIALIZED); | 248 | BIOerror(BIO_R_UNINITIALIZED); |
249 | return (-2); | 249 | return (-2); |
250 | } | 250 | } |
251 | 251 | ||
@@ -267,7 +267,7 @@ BIO_puts(BIO *b, const char *in) | |||
267 | long (*cb)(BIO *, int, const char *, int, long, long); | 267 | long (*cb)(BIO *, int, const char *, int, long, long); |
268 | 268 | ||
269 | if ((b == NULL) || (b->method == NULL) || (b->method->bputs == NULL)) { | 269 | if ((b == NULL) || (b->method == NULL) || (b->method->bputs == NULL)) { |
270 | BIOerr(BIO_F_BIO_PUTS, BIO_R_UNSUPPORTED_METHOD); | 270 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
271 | return (-2); | 271 | return (-2); |
272 | } | 272 | } |
273 | 273 | ||
@@ -278,7 +278,7 @@ BIO_puts(BIO *b, const char *in) | |||
278 | return (i); | 278 | return (i); |
279 | 279 | ||
280 | if (!b->init) { | 280 | if (!b->init) { |
281 | BIOerr(BIO_F_BIO_PUTS, BIO_R_UNINITIALIZED); | 281 | BIOerror(BIO_R_UNINITIALIZED); |
282 | return (-2); | 282 | return (-2); |
283 | } | 283 | } |
284 | 284 | ||
@@ -299,7 +299,7 @@ BIO_gets(BIO *b, char *in, int inl) | |||
299 | long (*cb)(BIO *, int, const char *, int, long, long); | 299 | long (*cb)(BIO *, int, const char *, int, long, long); |
300 | 300 | ||
301 | if ((b == NULL) || (b->method == NULL) || (b->method->bgets == NULL)) { | 301 | if ((b == NULL) || (b->method == NULL) || (b->method->bgets == NULL)) { |
302 | BIOerr(BIO_F_BIO_GETS, BIO_R_UNSUPPORTED_METHOD); | 302 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
303 | return (-2); | 303 | return (-2); |
304 | } | 304 | } |
305 | 305 | ||
@@ -310,7 +310,7 @@ BIO_gets(BIO *b, char *in, int inl) | |||
310 | return (i); | 310 | return (i); |
311 | 311 | ||
312 | if (!b->init) { | 312 | if (!b->init) { |
313 | BIOerr(BIO_F_BIO_GETS, BIO_R_UNINITIALIZED); | 313 | BIOerror(BIO_R_UNINITIALIZED); |
314 | return (-2); | 314 | return (-2); |
315 | } | 315 | } |
316 | 316 | ||
@@ -364,7 +364,7 @@ BIO_ctrl(BIO *b, int cmd, long larg, void *parg) | |||
364 | return (0); | 364 | return (0); |
365 | 365 | ||
366 | if ((b->method == NULL) || (b->method->ctrl == NULL)) { | 366 | if ((b->method == NULL) || (b->method->ctrl == NULL)) { |
367 | BIOerr(BIO_F_BIO_CTRL, BIO_R_UNSUPPORTED_METHOD); | 367 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
368 | return (-2); | 368 | return (-2); |
369 | } | 369 | } |
370 | 370 | ||
@@ -392,7 +392,7 @@ BIO_callback_ctrl(BIO *b, int cmd, | |||
392 | return (0); | 392 | return (0); |
393 | 393 | ||
394 | if ((b->method == NULL) || (b->method->callback_ctrl == NULL)) { | 394 | if ((b->method == NULL) || (b->method->callback_ctrl == NULL)) { |
395 | BIOerr(BIO_F_BIO_CALLBACK_CTRL, BIO_R_UNSUPPORTED_METHOD); | 395 | BIOerror(BIO_R_UNSUPPORTED_METHOD); |
396 | return (-2); | 396 | return (-2); |
397 | } | 397 | } |
398 | 398 | ||