summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/bio/bss_bio.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2016-10-13 15:57:25 +0800
committerPeter Jones <pjones@redhat.com>2016-11-30 12:57:34 -0500
commitb371a682fb67ff945a8095437b9b33cab549bb49 (patch)
tree55aa1f4552b1c96dbfd1b110e210cb7471ee06e4 /Cryptlib/OpenSSL/crypto/bio/bss_bio.c
parent43ad947f6e7d1e899d86fd8ca66a55ffbc3ed2b2 (diff)
downloadefi-boot-shim-b371a682fb67ff945a8095437b9b33cab549bb49.tar.gz
efi-boot-shim-b371a682fb67ff945a8095437b9b33cab549bb49.zip
Update to openssl 1.0.2j
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/bio/bss_bio.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/bio/bss_bio.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/Cryptlib/OpenSSL/crypto/bio/bss_bio.c b/Cryptlib/OpenSSL/crypto/bio/bss_bio.c
index 4d8727f8..3dd81877 100644
--- a/Cryptlib/OpenSSL/crypto/bio/bss_bio.c
+++ b/Cryptlib/OpenSSL/crypto/bio/bss_bio.c
@@ -149,9 +149,13 @@ static int bio_new(BIO *bio)
return 0;
b->peer = NULL;
+ b->closed = 0;
+ b->len = 0;
+ b->offset = 0;
/* enough for one TLS record (just a default) */
b->size = 17 * 1024;
b->buf = NULL;
+ b->request = 0;
bio->ptr = b;
return 1;
@@ -655,16 +659,15 @@ static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr)
break;
case BIO_CTRL_EOF:
- {
- BIO *other_bio = ptr;
-
- if (other_bio) {
- struct bio_bio_st *other_b = other_bio->ptr;
+ if (b->peer != NULL) {
+ struct bio_bio_st *peer_b = b->peer->ptr;
- assert(other_b != NULL);
- ret = other_b->len == 0 && other_b->closed;
- } else
+ if (peer_b->len == 0 && peer_b->closed)
ret = 1;
+ else
+ ret = 0;
+ } else {
+ ret = 1;
}
break;