From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: ALPN support for GnuTLS connections Date: Mon, 30 Sep 2024 15:13:05 +0200 Message-ID: <87ttdx1dzy.fsf@gmail.com> References: <7f11f60c-37da-4123-ae5b-98c79a132bb1@risk-engineering.org> <87zfnp1oqa.fsf@gmail.com> <3b0509fe-5a30-4e2a-a9fa-c196d79c81d4@risk-engineering.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34953"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eric Marsden Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 30 15:13:52 2024 Return-path: Envelope-to: ged-emacs-devel@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 1svGDn-0008xS-87 for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Sep 2024 15:13:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svGDC-0003T2-7S; Mon, 30 Sep 2024 09:13:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svGDA-0003MX-3y for emacs-devel@gnu.org; Mon, 30 Sep 2024 09:13:12 -0400 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svGD7-0000Hx-Qh for emacs-devel@gnu.org; Mon, 30 Sep 2024 09:13:11 -0400 Original-Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42cb806623eso33563495e9.2 for ; Mon, 30 Sep 2024 06:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727701988; x=1728306788; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from:from :to:cc:subject:date:message-id:reply-to; bh=37/SFpY3SkfJ7uU2/UT600PxhgPOYbt3sTH7n3pAExA=; b=moCRL0PRsj/1Op0jJSQYY56C21jdxo/vZauR5fi9KFwUjg+yMYJq42G+RUJ/pDiFxz EFBMJhF1DCQ1HRekbxknRMuMMT1KBEEfHIRY0B8ORid2MNhyov35fZ1ieCwpijpfFVGq N4IypoHn0YwPSWPfXF3/2R4yUQJg8S4NCoHOCKnHRNZhRBXZd0yi1F0EvURDsfguLQnL 2i8XtdWR7WCjJPMSXvGFmZL97+HJRfwoxJDdQ2H745qJkX8D4B9UHs3ZFxD4v2MOz4I4 hLMLixfhLO3aeIgpxkV8B0XXikxEFEHWwOPWxD6Gygp+6TinilqimXdm4qmkNZ8gfp6M iPcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727701988; x=1728306788; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=37/SFpY3SkfJ7uU2/UT600PxhgPOYbt3sTH7n3pAExA=; b=CIWA/G2KX9hiSKE4J+kuszykuejn+Fy8jQ6HF3X2NSSQZ34kWAqTNWq2QfXccYeg51 CCBfdxx+IG8/vDI0VVI9M3ps/BinazWPuguPZTL8mNNGEk6YbeFZz5vq7B4iR4igZInp X7BtFBKHlcIHKgK/B1pEx2aw9U+rJMuSIxOoM0jlk+KmUgdWgBzlbDQ+scXHdov2scjP jCY4G2QB4V4ZB4r9ZQJErzef4ObQygm2vDjgx/bmmQPmX4HEDe2MSzyM6iFINBCQLiFm Ef4LgkosUSgrKYexPTGaLq+GNily4sUXWGqyH2fQgO1J+tf+of74WeNsyV4sOftTdX+v jIWA== X-Gm-Message-State: AOJu0YxZSzQ4Ktar7nekW1KMLMu5YMz+Y6bs8dDXD3RyZivLyAlYZPve cZdlBdv9Ea5pbL35jJu4MWmrtKCPOJ4+g6jliI3LGF5a8Ch82HMcdt/C5Q== X-Google-Smtp-Source: AGHT+IGB/5UpYbozZ7XLAns2kO7Krev3hW8OKTOTKYaqxQ1/z04PpkguswN352CR3BRt9kmL24vdjQ== X-Received: by 2002:a05:600c:35d2:b0:42c:b309:8d18 with SMTP id 5b1f17b1804b1-42f58439ce7mr74523895e9.19.1727701987465; Mon, 30 Sep 2024 06:13:07 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb51:ea4b:875:7c6f:e64f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e969f1fe4sm150026215e9.14.2024.09.30.06.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 06:13:06 -0700 (PDT) In-Reply-To: <3b0509fe-5a30-4e2a-a9fa-c196d79c81d4@risk-engineering.org> (Eric Marsden's message of "Mon, 30 Sep 2024 12:21:30 +0200") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=rpluim@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324220 Archived-At: >>>>> On Mon, 30 Sep 2024 12:21:30 +0200, Eric Marsden said: Eric> On 30/09/2024 11:21, Robert Pluim wrote: >> Why would we need the 'get' API? Did you want to be able to set the >> GNUTLS_ALPN_MANDATORY flag and fail the connection? Eric> I don't think this is a critical requirement, but I see that some Eric> software using GnuTLS offers the possibility to fail the connecti= on Eric> if the selected application protocol is not in the requested list Eric> (for example, the "--alpn-fatal" commandline argument to gnutls-s= erv). OK, we=CA=BCll leave it aside for now. >> For the 'set' I guess we could add a keyword parameter to >> `gnutls-negotiate' and its callers, and pass that down to >> `gnutls-boot-parameters'. Eric> That sounds good to me. Something like :alpn-protocols that Eric> accepts a list of strings, or a comma-separated string. Eric> (I should add that I am not volunteering to implement this; I have Eric> no confidence in my ability to write the constrained type of C Eric> needed for the Emacs core.) Think of it as a learning experience :-) The existing code in `gnutls-boot' already does very similar things for other parameters. If I propose a patch, could you test it? I should be able to have something by the end of the week. Robert --=20