diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bss_bio.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_bio.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libcrypto/bio/bss_bio.c b/src/lib/libcrypto/bio/bss_bio.c index c817910d93..20eb9a9829 100644 --- a/src/lib/libcrypto/bio/bss_bio.c +++ b/src/lib/libcrypto/bio/bss_bio.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bss_bio.c,v 1.22 2015/12/23 20:37:23 mmcc Exp $ */ | 1 | /* $OpenBSD: bss_bio.c,v 1.23 2017/01/29 17:49:22 beck Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -348,7 +348,7 @@ bio_write(BIO *bio, const char *buf, int num_) | |||
348 | b->request = 0; | 348 | b->request = 0; |
349 | if (b->closed) { | 349 | if (b->closed) { |
350 | /* we already closed */ | 350 | /* we already closed */ |
351 | BIOerr(BIO_F_BIO_WRITE, BIO_R_BROKEN_PIPE); | 351 | BIOerror(BIO_R_BROKEN_PIPE); |
352 | return -1; | 352 | return -1; |
353 | } | 353 | } |
354 | 354 | ||
@@ -425,7 +425,7 @@ bio_nwrite0(BIO *bio, char **buf) | |||
425 | 425 | ||
426 | b->request = 0; | 426 | b->request = 0; |
427 | if (b->closed) { | 427 | if (b->closed) { |
428 | BIOerr(BIO_F_BIO_NWRITE0, BIO_R_BROKEN_PIPE); | 428 | BIOerror(BIO_R_BROKEN_PIPE); |
429 | return -1; | 429 | return -1; |
430 | } | 430 | } |
431 | 431 | ||
@@ -491,10 +491,10 @@ bio_ctrl(BIO *bio, int cmd, long num, void *ptr) | |||
491 | 491 | ||
492 | case BIO_C_SET_WRITE_BUF_SIZE: | 492 | case BIO_C_SET_WRITE_BUF_SIZE: |
493 | if (b->peer) { | 493 | if (b->peer) { |
494 | BIOerr(BIO_F_BIO_CTRL, BIO_R_IN_USE); | 494 | BIOerror(BIO_R_IN_USE); |
495 | ret = 0; | 495 | ret = 0; |
496 | } else if (num == 0) { | 496 | } else if (num == 0) { |
497 | BIOerr(BIO_F_BIO_CTRL, BIO_R_INVALID_ARGUMENT); | 497 | BIOerror(BIO_R_INVALID_ARGUMENT); |
498 | ret = 0; | 498 | ret = 0; |
499 | } else { | 499 | } else { |
500 | size_t new_size = num; | 500 | size_t new_size = num; |
@@ -679,14 +679,14 @@ bio_make_pair(BIO *bio1, BIO *bio2) | |||
679 | b2 = bio2->ptr; | 679 | b2 = bio2->ptr; |
680 | 680 | ||
681 | if (b1->peer != NULL || b2->peer != NULL) { | 681 | if (b1->peer != NULL || b2->peer != NULL) { |
682 | BIOerr(BIO_F_BIO_MAKE_PAIR, BIO_R_IN_USE); | 682 | BIOerror(BIO_R_IN_USE); |
683 | return 0; | 683 | return 0; |
684 | } | 684 | } |
685 | 685 | ||
686 | if (b1->buf == NULL) { | 686 | if (b1->buf == NULL) { |
687 | b1->buf = malloc(b1->size); | 687 | b1->buf = malloc(b1->size); |
688 | if (b1->buf == NULL) { | 688 | if (b1->buf == NULL) { |
689 | BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE); | 689 | BIOerror(ERR_R_MALLOC_FAILURE); |
690 | return 0; | 690 | return 0; |
691 | } | 691 | } |
692 | b1->len = 0; | 692 | b1->len = 0; |
@@ -696,7 +696,7 @@ bio_make_pair(BIO *bio1, BIO *bio2) | |||
696 | if (b2->buf == NULL) { | 696 | if (b2->buf == NULL) { |
697 | b2->buf = malloc(b2->size); | 697 | b2->buf = malloc(b2->size); |
698 | if (b2->buf == NULL) { | 698 | if (b2->buf == NULL) { |
699 | BIOerr(BIO_F_BIO_MAKE_PAIR, ERR_R_MALLOC_FAILURE); | 699 | BIOerror(ERR_R_MALLOC_FAILURE); |
700 | return 0; | 700 | return 0; |
701 | } | 701 | } |
702 | b2->len = 0; | 702 | b2->len = 0; |
@@ -822,7 +822,7 @@ BIO_nread0(BIO *bio, char **buf) | |||
822 | long ret; | 822 | long ret; |
823 | 823 | ||
824 | if (!bio->init) { | 824 | if (!bio->init) { |
825 | BIOerr(BIO_F_BIO_NREAD0, BIO_R_UNINITIALIZED); | 825 | BIOerror(BIO_R_UNINITIALIZED); |
826 | return -2; | 826 | return -2; |
827 | } | 827 | } |
828 | 828 | ||
@@ -839,7 +839,7 @@ BIO_nread(BIO *bio, char **buf, int num) | |||
839 | int ret; | 839 | int ret; |
840 | 840 | ||
841 | if (!bio->init) { | 841 | if (!bio->init) { |
842 | BIOerr(BIO_F_BIO_NREAD, BIO_R_UNINITIALIZED); | 842 | BIOerror(BIO_R_UNINITIALIZED); |
843 | return -2; | 843 | return -2; |
844 | } | 844 | } |
845 | 845 | ||
@@ -855,7 +855,7 @@ BIO_nwrite0(BIO *bio, char **buf) | |||
855 | long ret; | 855 | long ret; |
856 | 856 | ||
857 | if (!bio->init) { | 857 | if (!bio->init) { |
858 | BIOerr(BIO_F_BIO_NWRITE0, BIO_R_UNINITIALIZED); | 858 | BIOerror(BIO_R_UNINITIALIZED); |
859 | return -2; | 859 | return -2; |
860 | } | 860 | } |
861 | 861 | ||
@@ -872,7 +872,7 @@ BIO_nwrite(BIO *bio, char **buf, int num) | |||
872 | int ret; | 872 | int ret; |
873 | 873 | ||
874 | if (!bio->init) { | 874 | if (!bio->init) { |
875 | BIOerr(BIO_F_BIO_NWRITE, BIO_R_UNINITIALIZED); | 875 | BIOerror(BIO_R_UNINITIALIZED); |
876 | return -2; | 876 | return -2; |
877 | } | 877 | } |
878 | 878 | ||