From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50507: New function in Emacs GnuTLS implementation Date: Fri, 30 Sep 2022 13:47:06 +0300 Message-ID: <83ill5dtqt.fsf@gnu.org> References: <83ee9wiozc.fsf@gnu.org> <87sflkgy49.fsf@gnus.org> <87edwd15ck.fsf@gnus.org> <87tu4u8kjv.fsf@gnus.org> <878rm69hop.fsf@gmail.com> <87v8p7d4oq.fsf@gmail.com> <87a66id03q.fsf@gmail.com> <875yh6cly4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24964"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50507@debbugs.gnu.org, rpluim@gmail.com, larsi@gnus.org To: Nikolaos Chatzikonstantinou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 30 12:48:37 2022 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 1oeDZN-0006GJ-BQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Sep 2022 12:48:37 +0200 Original-Received: from localhost ([::1]:58588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeDZL-0000MB-PA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Sep 2022 06:48:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeDYo-0000KX-3A for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 06:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeDYn-0002HG-S0 for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 06:48:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oeDYn-0004ju-N7 for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 06:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Sep 2022 10:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 50507-submit@debbugs.gnu.org id=B50507.166453485118076 (code B ref 50507); Fri, 30 Sep 2022 10:48:01 +0000 Original-Received: (at 50507) by debbugs.gnu.org; 30 Sep 2022 10:47:31 +0000 Original-Received: from localhost ([127.0.0.1]:40604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeDYI-0004hU-Tp for submit@debbugs.gnu.org; Fri, 30 Sep 2022 06:47:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeDYE-0004hC-HP for 50507@debbugs.gnu.org; Fri, 30 Sep 2022 06:47:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeDY9-0002Eu-8Z; Fri, 30 Sep 2022 06:47:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=BI0nSa8k8OHxvjtB5n+eO/3rVJj+VdfjCPiaWgUgRPA=; b=JynK9/nXmOpR9TrbIatC 3pS2G3scMo7GpMNyozx3Ml2zFJP+eVMB5wTIPMGQt0MJtLnfWYOPNMPRt4QCilpcHe9XfHoA6e2Nh NE7ZgvtsosHfIezX6khuzeDvaLJ1n7Qsz8Pqciogh9KZn5JK6U0IL9QshXwjwuZEia/rUCUiZoF4P xuoHf1+qF0SfeRN9QSWRQph1gcBCTnavaV9cv7SSljRcaaZqml7iQXz4z7Ah2ttu84Lne1tnwzg4p R0vkSqoZNih66am21Xzak+1fmPcyTTzX4Ht3Fu8ht3vRqKewdp2WzVPDzixGlZuTjD/lh5Wm8kYc6 B08TJtOIDK4ntw==; Original-Received: from [87.69.77.57] (port=3488 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeDY8-0003zZ-3Q; Fri, 30 Sep 2022 06:47:20 -0400 In-Reply-To: (message from Nikolaos Chatzikonstantinou on Fri, 30 Sep 2022 06:04:30 -0400) 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:243987 Archived-At: > From: Nikolaos Chatzikonstantinou > Date: Fri, 30 Sep 2022 06:04:30 -0400 > Cc: 50507@debbugs.gnu.org, Lars Ingebrigtsen , Eli Zaretskii > > > On Thu, Sep 29, 2022 at 10:08 AM Robert Pluim wrote: > > > > >>>>> On Thu, 29 Sep 2022 09:44:09 -0400, Nikolaos Chatzikonstantinou said: > > Nikolaos> +The :pass and :flags keys are ignored with old versions of GnuTLS, and > > Nikolaos> +:flags is ignored if :pass is not specified. > > Nikolaos> + > > >> > > >> Maybe mention that not specifying :flags or passing :flags nil means > > >> passing '0' to the GnuTLS function? > > > > Nikolaos> Yes, and on that note, I discovered two things. One, the value 0 is > > Nikolaos> special; it has meaning but it is not an enumeration constant. I > > Nikolaos> documented this appropriately. Two, the password may be NULL instead > > Nikolaos> of a string. > > > > OK. I guess youʼre mapping ':pass nil' to that? > > Yes. > > > Nikolaos> + DEFSYM (Qgnutls_pkcs_plain, "GNUTLS_PKCS_PLAIN"); > > Nikolaos> > > Nikolaos> + DEFSYM (Qgnutls_pkcs_pbes2_gost_cpd, "GNUTLS_PKCS_PBES2_GOST_CPD"); > > >> > > >> All this is kind of awkward, but apart from doing DEFVAR_LISP Iʼm not > > >> aware of how to define a lisp level symbol with a value (it would > > >> allow you to simplify `key_file2_aux', since you could just extract > > >> the values directly from the symbols). > > > > Nikolaos> I am now comparing against intern("GNUTLS_PKCS_PLAIN") and so on. > > > > I guess thatʼs another option, but itʼs not the preferred > > solution. Anyway, letʼs not let the perfect be the enemy of the good. > > I went with intern. Why not use DEFSYM and then compare against the static symbols? That is more efficient, since the intern call is avoided at run time.