summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_err.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-01-17 17:39:19 +0000
committerMatt Caswell <matt@openssl.org>2020-02-04 14:39:29 +0000
commitd924dbf4ae127c68463bcbece04b6e06abc58928 (patch)
tree465bacfdfae92f28ee84ae47fba82f4fb044f2fa /ssl/ssl_err.c
parent579422c85cf606c0ae1d4baf414010dc21da657a (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: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/10907)
Diffstat (limited to 'ssl/ssl_err.c')
-rw-r--r--ssl/ssl_err.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c
index fc81948815..517e90c141 100644
--- a/ssl/ssl_err.c
+++ b/ssl/ssl_err.c
@@ -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 Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -489,6 +489,8 @@ static const ERR_STRING_DATA SSL_str_reasons[] = {
"unexpected ccs message"},
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_END_OF_EARLY_DATA),
"unexpected end of early data"},
+ {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_EOF_WHILE_READING),
+ "unexpected eof while reading"},
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_MESSAGE), "unexpected message"},
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_RECORD), "unexpected record"},
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNINITIALIZED), "uninitialized"},