Bug #74598 [Opn->Ver]: unlink ignores stream context

From: Date: Tue, 16 May 2017 07:09:50 +0000
Subject: Bug #74598 [Opn->Ver]: unlink ignores stream context
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209148@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74598&edit=1 ID: 74598 Updated by: requinix@php.net Reported by: ma at temponizer dot dk Summary: unlink ignores stream context -Status: Open +Status: Verified Type: Bug -Package: Filesystem function related +Package: FTP related Operating System: CentOS PHP Version: 7.0.19 Block user comment: N Private report: N New Comment: Indeed, it is ignored. https://github.com/php/php-src/blob/PHP-7.0.19/ext/standard/ftp_fopen_wrapper.c#L911 Same for rename, mkdir, and rmdir. opendir and stat do use it. Previous Comments: ------------------------------------------------------------------------ [2017-05-16 06:57:53] ma at temponizer dot dk Just tested further and it seems like it ignores the stream context completely. ------------------------------------------------------------------------ [2017-05-15 14:10:40] ma at temponizer dot dk Description: ------------ When using unlink for a FTPS filename with a stream context where verify_peer is set to false, it still tries to verify the certificate. This results in two warnings - "SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed" - "Unable to connect to ftps://servername/path" Test script: --------------- $sslContext = stream_context_create(['ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false ]]); unlink('ftps://servername/path', $sslContext); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74598&edit=1

« previous php.bugs (#209148) next »