summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-01-17 17:39:19 +0000
committerMatt Caswell <matt@openssl.org>2020-02-20 17:02:30 +0000
commitdb943f43a60d1b5b1277e4b5317e8f288e7a0a3a (patch)
tree3c1d49da92ec78d523eb16b39ec1f51cd79e4905 /include
parentb22a4996f38883e8376470597fef15a24cd8f535 (diff)
Detect EOF while reading in libssl
If we hit an EOF while reading in libssl then we will report an error back to the application (SSL_ERROR_SYSCALL) but errno will be 0. We add an error to the stack (which means we instead return SSL_ERROR_SSL) and therefore give a hint as to what went wrong. Contains a partial fix for #10880 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/10882)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/bio.h1
-rw-r--r--include/openssl/sslerr.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/include/openssl/bio.h b/include/openssl/bio.h
index e1fddfb796..9e2bcddc3e 100644
--- a/include/openssl/bio.h
+++ b/include/openssl/bio.h
@@ -169,6 +169,7 @@ extern "C" {
*/
# define BIO_FLAGS_MEM_RDONLY 0x200
# define BIO_FLAGS_NONCLEAR_RST 0x400
+# define BIO_FLAGS_IN_EOF 0x800
typedef union bio_addr_st BIO_ADDR;
typedef struct bio_addrinfo_st BIO_ADDRINFO;
diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h
index 3d6850dea3..b6cac4f5f5 100644
--- a/include/openssl/sslerr.h
+++ b/include/openssl/sslerr.h
@@ -1,6 +1,6 @@
/*
* Generated by util/mkerr.pl DO NOT EDIT
- * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -733,6 +733,7 @@ int ERR_load_SSL_strings(void);
# define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243
# define SSL_R_UNEXPECTED_CCS_MESSAGE 262
# define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178
+# define SSL_R_UNEXPECTED_EOF_WHILE_READING 294
# define SSL_R_UNEXPECTED_MESSAGE 244
# define SSL_R_UNEXPECTED_RECORD 245
# define SSL_R_UNINITIALIZED 276