From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8AR1Dgzu6GIEdwEAbAwnHQ (envelope-from ) for ; Tue, 02 Aug 2022 11:27:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cFVyDgzu6GJ16wAAauVa8A (envelope-from ) for ; Tue, 02 Aug 2022 11:27:40 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D76471D63F for ; Tue, 2 Aug 2022 11:27:39 +0200 (CEST) Received: from localhost ([::1]:39612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIoBe-0005jS-NG for larch@yhetil.org; Tue, 02 Aug 2022 05:27:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oImot-0006y8-8R for guix-patches@gnu.org; Tue, 02 Aug 2022 04:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oImos-0005BD-Tj for guix-patches@gnu.org; Tue, 02 Aug 2022 04:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oImos-0002xO-NT for guix-patches@gnu.org; Tue, 02 Aug 2022 04:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56867] [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Aug 2022 08:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56867 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 56867@debbugs.gnu.org, guile-devel@gnu.org Received: via spool by 56867-submit@debbugs.gnu.org id=B56867.165942717611307 (code B ref 56867); Tue, 02 Aug 2022 08:00:02 +0000 Received: (at 56867) by debbugs.gnu.org; 2 Aug 2022 07:59:36 +0000 Received: from localhost ([127.0.0.1]:42196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oImoS-0002wI-Dt for submit@debbugs.gnu.org; Tue, 02 Aug 2022 03:59:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oImoN-0002w0-K7 for 56867@debbugs.gnu.org; Tue, 02 Aug 2022 03:59:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oImoH-00056E-6g; Tue, 02 Aug 2022 03:59:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=M/MRahan9GOHyklSBrHe0sq+kRwM7gSgmVZUpWZ1Gy4=; b=QhxJPeIfbaNT2CMI+VXx x4g3qTSzBmyOhjkkVbNPAy52wYmb0DxMWAleDqdDv51TICE/YtMGdS55flREfpN2xOgJgB2PUcvKd SlbkHUrvAlzVvuq9cpdITC6VdISHHTj2hWeoxJy+M4g4HjkrEkqyXrzSF+BJIq+GVfI900420rz4N OerxT0bkSER9K4zyxTwceAP2pwpB0kAY33DDpxHwXWhAZ8WRkKAckZtsGzVjDcxNNT8eh9N+C75Ln 4KIBs9+qWdcJuo67o2MriKVpwFQBgUEDBpE1wPGGTkyBGtg7k3XMpNacuMEVEWOxgElktt6AaAK6d iOhMqsDj0H+JcQ==; Received: from [193.50.110.235] (port=37018 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oImoG-0007dE-Qh; Tue, 02 Aug 2022 03:59:25 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220801090749.11655-1-ludo@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 15 Thermidor an 230 de la =?UTF-8?Q?R=C3=A9volution, ?= jour de la Brebis X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 02 Aug 2022 09:59:22 +0200 In-Reply-To: (Maxime Devos's message of "Mon, 1 Aug 2022 11:56:00 +0200") Message-ID: <87pmhjuld1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659432459; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=M/MRahan9GOHyklSBrHe0sq+kRwM7gSgmVZUpWZ1Gy4=; b=DyEkZCBhLziDrgz4toVxGy/XerdIhaM7EeEiNg/rlS1svvzQ93edsAMms+e+arnl5sjZnp j/5MPzeb2H8kV0LGOw+kDTDL1ICiAIZ3E6EJJLbjdqwUPcMoFU72vIeLaqtuSa+addof/U N6vUxnBMO+ePQTa6t7n9dnAWoCsvvPxPrsoH345npKHDFogiXBVzcc20Fp3AWR+g7279cp 0OQi0EuSKt9t9AVxP3a1dd7kHCeT6maSOHMnDjuAFDX0iloi7lvAFFO/Ir/kqD21Hyebrq oxEMpvinGg6v7NcIotmZmlqFVn7Tzb53MJ/yPhaXUTfptRXW/BkC83C2fpmUMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659432459; a=rsa-sha256; cv=none; b=AcxJivtUkPA7/s8fjaHLPRLnpLzO39PwwqEeKkijbaeYUMMvvYpWPCPkfNQstrRKViCjta 91JijDBTVvj5DTdGj6H3aozaqCStsy6AwcCo0upkG/Kr2pvVjhK5gHC8793FHlv6IVZZWa ehdPshEf1D0RjxuhP8IALUVPe6YbyTs2xGXhgt9ZjT+lA20/qJQB+T9DpwmC6xr5NwwPzy Oj6ln4Rlf1/5gJn+oJ39TLzx8XhG8RefakYxhB+WX6RGQSOm7ojcID0B18pAkzB5xOqlRR RqsSVfGpdsMCpKtv6197VDrMHxUBkXz0xMzpy0lOA0fKyucX/pXUSiN0zw3eEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QhxJPeIf; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QhxJPeIf; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D76471D63F X-Spam-Score: -4.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8J/cX9vWRjCd Hi, Maxime Devos skribis: > On 01-08-2022 11:07, Ludovic Court=C3=A8s wrote: [...] >> + (define (read! bv start count) >> + (define read >> + (catch 'gnutls-error >> + (lambda () >> + (get-bytevector-n! record bv start count)) >> + (lambda (key err proc . rest) >> + ;; When responding to "Connection: close" requests, some serv= ers >> + ;; close the connection abruptly after sending the response b= ody, >> + ;; without doing a proper TLS connection termination. Treat = it as >> + ;; EOF. This is fixed in GnuTLS 3.7.7. >> + (if (eq? err error/premature-termination) >> + the-eof-object >> + (apply throw key err proc rest))))) > > Objection: 'catch' makes the backtrace part happening inside the > 'get-bytevector-n!' disappear, because it is unwinding, as has been > noted a few times (in different contexts) by Attila Lendvai and me.=C2=A0 > Maybe use 'guard' with an appropriate condition instead? This code was already there and has just been moved around. (It=E2=80=99s = also code that will no longer be used going forward.) >> + (if (module-defined? (resolve-interface '(gnutls)) >> + 'set-session-record-port-close!) ;GnuTLS >= =3D 3.7.7 > > resolve-module (and presumably also sets #:ensure #t by default, which > sometimes causes 'module not found' messages to be replaced by > 'unbound variable', which I don't think is useful behaviour, can > #:ensure be set to #false? This is unnecessary: see the =E2=80=98load-gnutls=E2=80=99 mechanism there.= The idiom above is already used in a couple of places. Thanks for your feedback! Ludo=E2=80=99.