Bug #79589 [Com]: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading

From: Date: Sat, 30 May 2020 20:53:29 +0000
Subject: Bug #79589 [Com]: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227251@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79589&edit=1

 ID:                 79589
 Comment by:         huzaifarasheen900 at mail dot com
 Reported by:        mumu at seznam dot cz
 Summary:            error:14095126:SSL routines:ssl3_read_n:unexpected
                     eof while reading
 Status:             Open
 Type:               Bug
 Package:            OpenSSL related
 Operating System:   Windows 2012 R2
 PHP Version:        7.4.5
 Block user comment: N
 Private report:     N

 New Comment:

I Just want to add something.I did this with normal php and it worked fine but with the php laravel
framework it gives me the same error.
My php version 7.4.5,OS Win10 Pro 2019 in laravel 6.


Previous Comments:
------------------------------------------------------------------------
[2020-05-12 10:56:59] cmb@php.net

Well, the good news is that PHP 7.3.18RC1 and 7.4.6RC1 already
ship with OpenSSL 1.1.1g, so the immediate problem is solved.

The bad news is that there may indeed be an issue with our OpenSSL
usage.

------------------------------------------------------------------------
[2020-05-12 10:21:36] mumu at seznam dot cz

Description:
------------
I have started to receiving
file(): SSL operation failed with code 1. OpenSSL Error messages:
error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading
while trying to run 
file('https://www.cnb.cz/cs/financni-trhy/devizovy-trh/kurzy-devizoveho-trhu/kurzy-devizoveho-trhu/denni_kurz.txt?date=11.05.2020',
FILE_IGNORE_NEW_LINES);

This issue opened against OpenSSL might be related:
https://github.com/openssl/openssl/issues/11381

If I understand the OpenSSL issue thread correctly, they:
- They are confident the OpenSSL code change triggering this error is valid but they rollback the
change in 1.1.1f to not break backward compatibility while keeping the code in future major
versions.
- They insists the underlaying issue lays in softwares using OpenSSL as the software does not close
the SSL session correctly - see https://github.com/openssl/openssl/issues/11381#issuecomment-602229519


Test script:
---------------
<?php

$lines = file('https://www.cnb.cz/cs/financni-trhy/devizovy-trh/kurzy-devizoveho-trhu/kurzy-devizoveho-trhu/denni_kurz.txt?date=11.05.2020',
FILE_IGNORE_NEW_LINES);

dump_var($lines);

Expected result:
----------------
File is properly downloaded.

Actual result:
--------------
file(): SSL operation failed with code 1. OpenSSL Error messages: error:14095126:SSL
routines:ssl3_read_n:unexpected eof while reading


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=79589&edit=1


Thread (16 messages)

« previous php.bugs (#227251) next »