GNU bug report logs - #50507
New function in Emacs GnuTLS implementation

Previous Next

Package: emacs;

Reported by: Nikolaos Chatzikonstantinou <nchatz314 <at> gmail.com>

Date: Fri, 10 Sep 2021 12:02:02 UTC

Severity: wishlist

Tags: fixed, moreinfo

Fixed in version 30.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nikolaos Chatzikonstantinou <nchatz314 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 50507 <at> debbugs.gnu.org, rpluim <at> gmail.com, larsi <at> gnus.org
Subject: bug#50507: New function in Emacs GnuTLS implementation
Date: Fri, 30 Sep 2022 09:01:06 -0400
On Fri, Sep 30, 2022 at 6:47 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Nikolaos Chatzikonstantinou <nchatz314 <at> gmail.com>
> > Date: Fri, 30 Sep 2022 06:04:30 -0400
> > Cc: 50507 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>
> >
> >
> > On Thu, Sep 29, 2022 at 10:08 AM Robert Pluim <rpluim <at> gmail.com> wrote:
> > >
> > > >>>>> On Thu, 29 Sep 2022 09:44:09 -0400, Nikolaos Chatzikonstantinou <nchatz314 <at> gmail.com> 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> <removed a few more such lines>
> > >     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.

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?




This bug report was last modified 2 years and 143 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.