Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97208 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76098 invoked from network); 27 Nov 2016 15:10:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2016 15:10:59 -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.171 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.217.171 mail-ua0-f171.google.com Received: from [209.85.217.171] ([209.85.217.171:34608] helo=mail-ua0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/37-21589-087FA385 for ; Sun, 27 Nov 2016 10:10:57 -0500 Received: by mail-ua0-f171.google.com with SMTP id 51so119825103uai.1 for ; Sun, 27 Nov 2016 07:10:56 -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=nCI0FTkTokhb4nwZbpjxc8scCRcJ/TKxdmMRFU31Mw8=; b=iU0QAOKyjiKE8M6rlGu7XrwKV9VMRsSzDYtVodmmihUSOfH7G36GbBxB9ieENrcWuW 7iXnVW02C2I6ek0gYfrWLYiJaUrk6S6XI6yX1v6CEgTSWzC5V7brFhKsgSI+No28S48g rDOfhsx+MVi88rPd3tMAuU/v52akn3giUprJ9Es4X1rLrMaxDp4e+hAGqUFmjFcpmA0C ystRvgq/kDjhRFl9ARKxL8nZazs8+jlFqy0Qqy+CG/FeAxw5icJfrCSq+Y7ixhChDULB IFLnVErXjCPjwI8KxJhiR0gKixiLMeR8tTXEzqTIHd6Rfgnlw2g5LfF6zWmpmSZTYFhu 9AYQ== 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=nCI0FTkTokhb4nwZbpjxc8scCRcJ/TKxdmMRFU31Mw8=; b=cQ2HCvFWWnScV9WkS9C8Au1bm1Fe+VCMqzQ6uJgFKMxx7PGmflYZDtPFxUPIEVki8g K2iyFBFbzzFIB/bY9rPO8hCI/hstm2UN0O++9zQnMkN2iwJ76I26MEd6SdJa4HLJj1KM BG72AgSenaO9W9qt6VeayfiuUc9kPIhrhv8v7sR5nB9iwpJ3tVTyjp4zIDGKVHy+d0ZO d6NuKNaMzier5UowHwvUEK3KgvtZmdehKrr56UhNjm0JokQ6dVOEL5h2GVCgGojpMBOC hW0m81PbzJvWcap40ksSd2/yjS3HjtnFWtzcH0a8BTODqnuCGeMnYrHl+VYBrTEhxgIL QHPw== X-Gm-Message-State: AKaTC02nMS2S+nVqRNkB1deMcGdTcvj2BmauCjWDc0ZRmbSWpjbRmnJc2ub4Z3Goc+Z23uaFrKU8nINt/ERg7A== X-Received: by 10.176.81.56 with SMTP id e53mr13421833uaa.100.1480259454084; Sun, 27 Nov 2016 07:10:54 -0800 (PST) MIME-Version: 1.0 Sender: jakub.php@gmail.com Received: by 10.31.146.74 with HTTP; Sun, 27 Nov 2016 07:10:53 -0800 (PST) In-Reply-To: References: Date: Sun, 27 Nov 2016 15:10:53 +0000 X-Google-Sender-Auth: 1mtqEGxV-C2Mk34BcSXpoMfnp3k Message-ID: To: Niklas Keller Cc: PHP Internals Content-Type: multipart/alternative; boundary=94eb2c190c54efa9fa054249c232 Subject: Re: [PHP-DEV] [RFC] Distrust SHA-1 Certificates From: bukka@php.net (Jakub Zelenka) --94eb2c190c54efa9fa054249c232 Content-Type: text/plain; charset=UTF-8 On Sun, Nov 27, 2016 at 2:22 PM, Niklas Keller wrote: > > > 2016-11-27 14:09 GMT+01:00 Jakub Zelenka : > >> >> >> On Sun, Nov 27, 2016 at 1:06 PM, Jakub Zelenka wrote: >> >>> >>> >>> On Sat, Nov 26, 2016 at 3:49 PM, Niklas Keller wrote: >>> >>>> Morning Internals, >>>> >>>> I plan to distrust SHA-1 certificates by default in PHP 7.2. All major >>>> browsers will no longer trust SHA-1 certificates starting already >>>> 2017-01-01. >>>> >>>> Unfortunately, PHP doesn't even provide a way yet to limit the accepted >>>> algorithms for certificates. The RFC fixes that and introduces new >>>> defaults >>>> for PHP 7.2. The "signature_algorithms" context option will also be >>>> backported to PHP 5.6, which is only supported until the end of 2016 >>>> with >>>> regular releases, but after that there will be two more years of >>>> security-only updates. Therefore I'd like to get this done before the >>>> end >>>> of 2016. >>>> >>>> Currently the RFC aims for BC and doesn't restrict the algorithms on >>>> older >>>> versions. As all major browsers start distrusting those certificates on >>>> 2017-01-01 I'm not sure whether that's the correct choice. I'd like to >>>> go >>>> secure-by-default there and disable SHA-1 also on older versions. People >>>> which really need longer can always opt-out and add the needed >>>> algorithms >>>> again. Unfortunately, we didn't announce any plans regarding SHA-1 yet, >>>> so >>>> this might be a bit last-minute. >>>> >>>> You can read the full RFC in the wiki: >>>> https://wiki.php.net/rfc/distrust-sha1-certificates >>>> >>>> >>> I think you should change the format to match the one supported by >>> OpenSSL [1] which is also simpler. >>> >> > It is exactly in OpenSSL's format for SSL_CTX_set1_sigalgs_list. > Ah you right. I incorrectly read the RFC. So it's fine then. > > >> In general I'm not a big fan of such defaults especially when new values >>> can be added later (e.g. EdDSA that is specified in TLS 1.3) so we have to >>> keep it up to date which was kind of issue in the past. >>> >> > That's true, but I don't see a way in OpenSSL do have a blacklist instead, > but we could do that in our own verify callback. > Yeah but not sure if it's ideal too. Will have to think about it. > > >> However I see the point that we should make it easier for users to have >>> it secure by default so it's probably a good choice. It's not actually just >>> about SHA >>> >> >> Ah sent before I finished it. :) I wanted to say that it's not just about >> SHA-1 but also MD5 that I think we might still support but would have to >> double check that... >> > > I wanted to double-check that, too, but didn't do that yet. If MD5 is > still supported, we should definitely put it into PHP 5.6 as a security > update. > > As far as I can see, MD5 support is the case if it has not been disabled > by the OpenSSL version in use, as all supported algorithms are allowed by > default. > > 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. Cheers Jakub --94eb2c190c54efa9fa054249c232--