Skip to content

"unexpected eof while reading" with openssl-1.1.1e #5138

@hasso

Description

@hasso

I did this

$ curl https://www.presseportal.de 1>NUL
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  114k    0  114k    0     0   129k      0 --:--:-- --:--:-- --:--:--  129k
curl: (56) OpenSSL SSL_read: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading, errno 0
$

I expected the following

I expected it to succeed without an error. Downgrading openssl to 1.1.1d fixes the problem. My wild guess is that it's related to #4982 and this entry in the openssl-1.1.1e CHANGES file:

  *) Properly detect EOF while reading in libssl. Previously if we hit an EOF
     while reading in libssl then we would report an error back to the
     application (SSL_ERROR_SYSCALL) but errno would be 0. We now add
     an error to the stack (which means we instead return SSL_ERROR_SSL) and
     therefore give a hint as to what went wrong.
     [Matt Caswell]

curl/libcurl version

$ curl -V
curl 7.69.1 (x86_64-pc-linux-gnu) libcurl/7.69.1 OpenSSL/1.1.1e zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2020-03-11
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM SPNEGO SSL TLS-SRP UnixSockets

operating system

$ uname -a
Linux builder 4.19.111 #1 SMP Wed Mar 18 08:18:00 -00 2020 x86_64 Intel(R) Xeon(R) CPU E5-2637 v2 @ 3.50GHz GenuineIntel GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions