From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nikolaos Chatzikonstantinou Newsgroups: gmane.emacs.bugs Subject: bug#50507: New function in Emacs GnuTLS implementation Date: Fri, 30 Sep 2022 09:01:06 -0400 Message-ID: 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> <83ill5dtqt.fsf@gnu.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="1956"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50507@debbugs.gnu.org, rpluim@gmail.com, larsi@gnus.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 30 15:06:55 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 1oeFjD-0000NR-GY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Sep 2022 15:06:55 +0200 Original-Received: from localhost ([::1]:58524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeFjC-0002ir-FY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Sep 2022 09:06:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeFeU-00005v-5r for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 09:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeFeT-0000ra-SB for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 09:02:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oeFeT-0004Am-Lh for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 09:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nikolaos Chatzikonstantinou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Sep 2022 13:02: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.166454288915994 (code B ref 50507); Fri, 30 Sep 2022 13:02:01 +0000 Original-Received: (at 50507) by debbugs.gnu.org; 30 Sep 2022 13:01:29 +0000 Original-Received: from localhost ([127.0.0.1]:40760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeFdw-00049s-Sy for submit@debbugs.gnu.org; Fri, 30 Sep 2022 09:01:29 -0400 Original-Received: from mail-yw1-f169.google.com ([209.85.128.169]:38524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeFdr-00049Z-Ba for 50507@debbugs.gnu.org; Fri, 30 Sep 2022 09:01:27 -0400 Original-Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-3321c2a8d4cso43514137b3.5 for <50507@debbugs.gnu.org>; Fri, 30 Sep 2022 06:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=9lXnK02lN3cK16XJ8yS6NljbDW0cuHSMmGyOMipKkBY=; b=i+pz9QLEodkcZeYNUIZY/9XDIIzAGqlMnunKWrEXTQeo/FBIlTDisOWgfxoetxlV6k dQgVq7qr2jkUym15K1u3VXnTTRKNiSa8vDBnDk9+rLY39On+cOpXnRkgzpmnGbtcoPMX CgL4ZklXDyNzOecSEtkrWfU0KlMXPIngC/ws74Aq/SX8y9YODVLZPFj2xJkXATzXz16X VvREwbDkGlJQO4XqcmSK4nCivGg7DLevCt7av0WTU3FD+a0IEf125CxNJ/QLqdJhPN2r cjPmG1wm73XYBcsK2LzNauhpWEPL4t3vMU9S4JTzg+74sE1ayYdFUspBMm/UuptAWaCS vX/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=9lXnK02lN3cK16XJ8yS6NljbDW0cuHSMmGyOMipKkBY=; b=oMMem5NQziQxg6++cm6q0cgbZ3skY9hOufBAOPl22wg8IfNeFEAbsA+axthxSffNbv q04L1pJT8H1scxeGEDwNFt4pPjxJNGGci+BGDxe7A2n75lfcmKNE5StmEFePPKDk+lzr 5EP8AR2akLyAqodt/xwRrp7IV4iJaIc7gw+qPOp1Yv3SbGhAOpA2jwHRR33d3cxCFWch bdyXfZXNCIqLABqNT5y5Yoyq08R61+2EVa4ikpKfIE2Jht1CDkyBYaqQw0yXf/MhbkWh Bw8a1xJIFULKhM/4IRuG/dL9SrGDd/lnCWPYon97NRLYmZKgDlkmxg6sDgd/ozqa+ExD L6Hg== X-Gm-Message-State: ACrzQf3mGuBnaofZKci9uSS/4R+dTOebKjuInteYz/cObIB6+mQv/rEV qe3QyVHYHsLCHY/hrrU3/Mc4E0pjzXB8PceAuSg= X-Google-Smtp-Source: AMsMyM4B1aO9JJdbrJkjbqhRUjTC6WaImqmsYjDDJxRTV0swyNNuLhOO130yzFVoosyIiBd3wdmjzQdgkN+B37fIXzk= X-Received: by 2002:a81:5344:0:b0:350:a192:9fce with SMTP id h65-20020a815344000000b00350a1929fcemr8492794ywb.64.1664542877874; Fri, 30 Sep 2022 06:01:17 -0700 (PDT) In-Reply-To: <83ill5dtqt.fsf@gnu.org> 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:244004 Archived-At: On Fri, Sep 30, 2022 at 6:47 AM Eli Zaretskii wrote: > > > From: Nikolaos Chatzikonstantinou > > Date: Fri, 30 Sep 2022 06:04:30 -0400 > > Cc: 50507@debbugs.gnu.org, Lars Ingebrigtsen , Eli Zare= tskii > > > > > > 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 version= s 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, th= e value 0 is > > > Nikolaos> special; it has meaning but it is not an enumeration co= nstant. I > > > Nikolaos> documented this appropriately. Two, the password may be= NULL instead > > > Nikolaos> of a string. > > > > > > OK. I guess you=CA=BCre mapping ':pass nil' to that? > > > > Yes. > > > > > Nikolaos> + DEFSYM (Qgnutls_pkcs_plain, "GNUTLS_PKCS_PLAIN"); > > > Nikolaos> > > > Nikolaos> + DEFSYM (Qgnutls_pkcs_pbes2_gost_cpd, "GNUTLS_PKCS_PB= ES2_GOST_CPD"); > > > >> > > > >> All this is kind of awkward, but apart from doing DEFVAR_LISP = I=CA=BCm not > > > >> aware of how to define a lisp level symbol with a value (it wo= uld > > > >> allow you to simplify `key_file2_aux', since you could just ex= tract > > > >> the values directly from the symbols). > > > > > > Nikolaos> I am now comparing against intern("GNUTLS_PKCS_PLAIN") = and so on. > > > > > > I guess that=CA=BCs another option, but it=CA=BCs not the preferred > > > solution. Anyway, let=CA=BCs 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. I did not understand the differences between DEFSYM() and intern(). Can DEFSYM() be used outside of syms_of_gnutls()? In particular can I (and, should I?) call it inside the key_file2_aux() function?