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

From: Date: Tue, 12 May 2020 10:21:36 +0000
Subject: Bug #79589 [NEW]: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227008@lists.php.net to get a copy of this message
From:             mumu at seznam dot cz
Operating system: Windows 2012 R2
PHP version:      7.4.5
Package:          Filesystem function related
Bug Type:         Bug
Bug description:error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading

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 bug report at https://bugs.php.net/bug.php?id=79589&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79589&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79589&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79589&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79589&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79589&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79589&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79589&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79589&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79589&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79589&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79589&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79589&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79589&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79589&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79589&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79589&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79589&r=mysqlcfg


Thread (16 messages)

« previous php.bugs (#227008) next »