From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dick.r.chiang@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#49055: 28.0.50; [PATCH] De-obfuscate gnutls_handshake loop Date: Sat, 19 Jun 2021 13:34:21 -0400 Message-ID: <875yy9wyg2.fsf@dick> References: <87zgvqd35s.fsf@dick> <87zgvmyost.fsf@gnus.org> <83im2avuuu.fsf@gnu.org> <87o8c2vupo.fsf@gnus.org> <83h7huvucx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21587"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.14 (Gnus v5.14pre) Emacs/28.0.50 (gnu/linux) Cc: 49055@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 19 19:44:04 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1luf0m-0005WW-17 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Jun 2021 19:44:04 +0200 Original-Received: from localhost ([::1]:48340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luf0l-0007hO-2k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Jun 2021 13:44:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lues2-0002oi-CI for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 13:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lues1-0000PD-QI for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 13:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lues1-0003EQ-OM for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 13:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dick.r.chiang@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Jun 2021 17:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49055 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49055-submit@debbugs.gnu.org id=B49055.162412407012375 (code B ref 49055); Sat, 19 Jun 2021 17:35:01 +0000 Original-Received: (at 49055) by debbugs.gnu.org; 19 Jun 2021 17:34:30 +0000 Original-Received: from localhost ([127.0.0.1]:60728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luerW-0003DW-Ad for submit@debbugs.gnu.org; Sat, 19 Jun 2021 13:34:30 -0400 Original-Received: from mail-qv1-f42.google.com ([209.85.219.42]:44908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luerU-0003DJ-1R for 49055@debbugs.gnu.org; Sat, 19 Jun 2021 13:34:29 -0400 Original-Received: by mail-qv1-f42.google.com with SMTP id dj3so5295974qvb.11 for <49055@debbugs.gnu.org>; Sat, 19 Jun 2021 10:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Y1pfsnMxN3pSAw0DRb7AznDXwYnli3ZafkuMw+V2YOc=; b=o+EUZvu962/+XqDS1jrrkKzZpZ1OlwZXVIqbfrq+QdDG6GOPH3iS19PyTbX/tzpfJt 9bKYfT/Fg43s8xe2NvK1c1otlwenv4qNH3S+kH0ybbdKcqclQnjWpujRe5qngTXpqphd fllYXfbVHF3a8VgP9qikK/2tq/fo5pj+KRW6OApAtieLh7iF9VJxfDUtWBKReuqzwbAt a1YXufMJWtQ+g+BgugynM/aH8TeLHlestGBXtZQPCsivuTcTJv1kRPhNmcTmD+HlHMjs BRlfpMlrdww4Pnc/cH5JLMEpGftJ9/WHgrfVrlDgtj3gmLD1cR1OAHPPBDB//BG/P7/S +SKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Y1pfsnMxN3pSAw0DRb7AznDXwYnli3ZafkuMw+V2YOc=; b=T3gcjN+h3vuz8ED6o2aTIlS+1kaKfK8dxaGE7xD7zUABqdGj6RLkNpWNZpyUAXojzu 9MJZbQ6GKd/ZMhwUbZ5M2gS4q6IZ4a9oq6Y2NS5bPm4EDatqKMOc/jxxukt5FfUV+SzA MaiTA2asFH347jF0jI78oR8gkc17De2qFgHqYzyOuFEjOasbd7C9iOm9OhP/KnF+KJqY wspDq/TnMhhshxvxu4oOiEI+4smpjRrs/HmX1RCrT9qI7j26Ex5GNE22kTk287V+DpcB LVC8mqItvuEpJ2LovVT1of01G8gwxuyS2Oed4rsQte50J7ErFhnZMHGr0v2Dojustrii Gv6w== X-Gm-Message-State: AOAM532a+Be7dDmHry9Gx7fD+xbrF+qdXtWrurSEEgDaZITfDBOfGfdi zBNTa4g1emSK7bdi9jpWrj4= X-Google-Smtp-Source: ABdhPJzP76baALTREE2A9Ge/VOctE6P3wF6WBapPl7SnfV4tL0K9wcraP3dE+KJ8Aw9MGTQqO+E97Q== X-Received: by 2002:ad4:58af:: with SMTP id ea15mr11558812qvb.59.1624124062495; Sat, 19 Jun 2021 10:34:22 -0700 (PDT) Original-Received: from localhost (pool-71-190-212-171.nycmny.fios.verizon.net. [71.190.212.171]) by smtp.gmail.com with ESMTPSA id m11sm4910289qtn.81.2021.06.19.10.34.21 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Jun 2021 10:34:21 -0700 (PDT) In-Reply-To: <83h7huvucx.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Jun 2021 16:47:58 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208762 Archived-At: > . the gnutls_error_is_fatal call is missing from the new code Yes, and just as well since it's redundant with `emacs_gnutls_handle_error`. > . the negative values of 'ret' (if they are significant) aren't > tested anymore This unchanged line 626 begs to differ. while ((ret = gnutls_handshake (state)) < 0) > . the condition of GNUTLS_E_INTERRUPTED is tested only once, and > immediately causes the outer while-loop to be abandoned Yes, as the commit before e87e6a2 did. You do realize I hope that e87e6a2, in its desire to keep the loop going under GNUTLS_E_INTERRUPTED, almost certainly did not intend to call `gnutls_handshake` twice when GNUTLS_E_INTERRUPTED was not applicable. > I'd love to see some rationale for these differences. Your skepticism is a credit to your earnestness. However, your expert scrutiny is better applied to misguided commits like e87e6a2 and d84d69d.