Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97210 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86982 invoked from network); 27 Nov 2016 19:38:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2016 19:38:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.169 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.217.169 mail-ua0-f169.google.com Received: from [209.85.217.169] ([209.85.217.169:36302] helo=mail-ua0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/68-21589-1163B385 for ; Sun, 27 Nov 2016 14:37:55 -0500 Received: by mail-ua0-f169.google.com with SMTP id b35so123294563uaa.3 for ; Sun, 27 Nov 2016 11:37:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5+LXrENAG69mXus9V3FpAzqlh1ZpT2zcU/B5owTJPXQ=; b=xfPgCr6MtR1nu86U7OjxbXIA2b3zoeZi3Jj4jZzqDP4gW6OyB8SW5NpFYp8R/fbTMc 7W7g9cfuZ5tNUPPNc+TVgHLWga5lg8tV+94Aw24keSJKwh79rK3uVqhkvZxPnCEyb+wD fSMRiU0eb/eYsVo2alDlD1oyxL59f0hCpTovOkwkqfHemTOS0pOk3hN31y3tzPXTwPGD 9wL1YhIMC6SCjypYvMv3nzu8Xs73BlpSdGeUlyDiASdaDK6bWoYIo4YpXNS574SMtx0K fQWEUA/jqzypoetzCXP2ZMsTwOWRtNYmSvfrARahwXvjFNE8AFCa1bgtKL6XrLS02eZ9 z7IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5+LXrENAG69mXus9V3FpAzqlh1ZpT2zcU/B5owTJPXQ=; b=afGp2sc9ixY/82ayD4HLgeI1k2YHoW75IvzS41ftO8X29ySYN4LvKJ6r6yoy5SCFQu hzYAO75s7N3DR7O2pXTZXWF8OYURgGq1E91bLUexVpVWgX/3suuEvDRlf/Fo2Rx10QHY /I3/ycXzX4FA3XruU6UVc8/KNmBzPxi6gBaawnAmww2DDiH4BMfC90B/U250a1+aWTsE dvd6OJ0+ixs48bzLrEnEj/06jyaLiOLKh+WlJ2pTrAzl+cvJTNysJ91esBbxWstcsa69 UykOzIJRVxzbKuyIXs25npxYmlmgg+DwSkM9yHMJbVcql8ry8TNpihuMGS7X79pa3zAi efKw== X-Gm-Message-State: AKaTC00t2VwdnrNQddi/UNwXSspS+H4lvAvPjr4oEEgCC0+YE/Git+h+Ci19isW+82d7HL+gmFBx7bAT6OXfsw== X-Received: by 10.159.34.42 with SMTP id 39mr13409670uad.84.1480275471107; Sun, 27 Nov 2016 11:37:51 -0800 (PST) MIME-Version: 1.0 Sender: jakub.php@gmail.com Received: by 10.31.146.74 with HTTP; Sun, 27 Nov 2016 11:37:50 -0800 (PST) In-Reply-To: References: Date: Sun, 27 Nov 2016 19:37:50 +0000 X-Google-Sender-Auth: DY_8k2e-mjQZY51qLms20mmKRoE Message-ID: To: Niklas Keller Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a113d01e2a00a0605424d7d34 Subject: Re: [PHP-DEV] [RFC] Distrust SHA-1 Certificates From: bukka@php.net (Jakub Zelenka) --001a113d01e2a00a0605424d7d34 Content-Type: text/plain; charset=UTF-8 On Sun, Nov 27, 2016 at 3:17 PM, Niklas Keller wrote: > > SSL_CTX_set1_sigalgs is anyway only supported starting in OpenSSL 1.0.2, >> > so we need a custom verify callback for older OpenSSL versions. In our >> own >> > verify callback we can use a blacklist instead of the suggested >> whitelist >> > by default. >> > >> > >> No need to add support for 1.0.1 as it's going to be EOL end of December. >> Lower version are EOL already. >> > > That may be true, but we only raised the minimum requirement for newer > versions of PHP. If this is going to be backported for PHP 5.6 / 7.0 / 7.1, > we have to support those older OpenSSL versions I guess? > > Well it depends if it requires feature available only in the later version of OpenSSL which would be the case for the currently proposed version of the RFC that would make use of SSL_CTX_set1_sigalgs_list macro. I don't think that we should parse the string of allowed sig algs and re-implement it for OpenSSL versions that are EOL anyway. It's not something unusual to have a feature dependent on the library version. For example we did exactly the some for openssl_pbkdf2 that worked only if it was compiled with OpenSSL 1.0.0+. So if you had PHP 7.0 and OpenSSL 0.9.8, it wasn't available. I have been thinking about the defaults and I don't think we should have any default value for this. Instead we should concentrate on supporting security levels [1]. That will give a much better way how to define a number of bits security. For example if we have selected level 2 to get 112 bits of security, then the SSH-1 sig algs would be automatically disabled as it offers only 80 bits of security. It would also disable all other weaker algs so user couldn't for example use RSA keys shorter than 2048 bits. That's much better and easier way for users to define the security as they would just need to set a number (from 0 to 5 atm). I'm aware that this is supported only by OpenSSL 1.1 but I wouldn't see that as an issue. At the time the PHP 7.2 is out, there will be much bigger usage of OpenSSL 1.1 and the users on lower version could still disable it manually. [1] https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_security_level.html Cheers Jakub --001a113d01e2a00a0605424d7d34--