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 12:22:16 -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> <837d1ldlv3.fsf@gnu.org> <87a66haq6n.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000690b5e05e9e7660f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19503"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50507@debbugs.gnu.org, Eli Zaretskii , larsi@gnus.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 30 18:23:27 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 1oeInK-0004n6-AF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Sep 2022 18:23:22 +0200 Original-Received: from localhost ([::1]:49332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeInJ-0007Pm-4l for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Sep 2022 12:23:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeIn2-0007Lw-6m for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 12:23:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeImz-0000g4-Vk for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 12:23:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oeImz-0003vR-Qw for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 12:23: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 16:23: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.166455495815050 (code B ref 50507); Fri, 30 Sep 2022 16:23:01 +0000 Original-Received: (at 50507) by debbugs.gnu.org; 30 Sep 2022 16:22:38 +0000 Original-Received: from localhost ([127.0.0.1]:42768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeImb-0003ue-ND for submit@debbugs.gnu.org; Fri, 30 Sep 2022 12:22:38 -0400 Original-Received: from mail-yb1-f170.google.com ([209.85.219.170]:36469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeImY-0003uQ-Es for 50507@debbugs.gnu.org; Fri, 30 Sep 2022 12:22:36 -0400 Original-Received: by mail-yb1-f170.google.com with SMTP id 126so5848471ybw.3 for <50507@debbugs.gnu.org>; Fri, 30 Sep 2022 09:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=p/Q6BSJTS5M4Nl6xPYOYKi6ObCFu0ezw/hDKxLvHcu0=; b=SQThMwp6bajoMz8brUQU37MH4EgGu+jN5qj8nVvqUsRhEIO0fcLF4CGbdmK3SW2EZL M5ZJtcis3yRwSHD7NWqTNqKdka2a/GZt77jM+NRK2lLQ28qwj5NHVb9KjXXW2TCSwyrY QA6E1ozpOrDv4BYvma3DuLW1YSIJEMbHPyNPnyRHPXKX90GrGm/d4onp6i4RdjEetrXm 0LHeBUP93ctspR7IapYwnVKs07IpVgw6vzoK4mnTmQDbDouMdBDxCjTtd7Z9CA1O6Rfz Zb6PXhxxQFLaylkep+WyX0E5UNA6KOghmFKPPJUxfmrHh0HBoTBmHiT6JxpaIhJBgUpy UX5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=p/Q6BSJTS5M4Nl6xPYOYKi6ObCFu0ezw/hDKxLvHcu0=; b=gwdJicfXtEGlIRtcJWvCOHv8LC+H39RKsvXILYGd7Duu4x160FqiIsJub8r1V6Meuh vhwEU8tFMlNOcDkk8eWu+aJdfRAW2HTfYUtISUAOA8+uHP92jwvk5RwXeWyulj53SHiV AZR0prf5ZkpA43dZiFhoqz0rQ+CwiB9bIGyli6CQTPckCiUKQaMOkmEA/H5sADgh/4Xo pEMWopl43dTGkCNCSIHPXK+q9WJHI63KpPOao4ybh0izlDwBpCMUSS7hGDFfK1kIvkOw 0qSPLgGe5+/cNRjOsLF9NflKbCx6GDblrZhtvFOqx0eub9GqXnC4aXlMfRhS8KAfIEq0 YJkg== X-Gm-Message-State: ACrzQf1KgBQdQDDK2t31lbiYZOeU5qmnuHRDYdotTnk7LjrskcltiFEB mTgh+dv/c2MlCFOAGqrcnUVA4a8RvqQJKSgNFx8= X-Google-Smtp-Source: AMsMyM6e7PyAqvhh8YqO6kOMZcZOIrrgSptKotOKfmvxARIF0bZeEecLUhJyydbNsPrJuhHhVZYMdR9qchfcZHcKklg= X-Received: by 2002:a05:6902:8d:b0:6bc:47ea:42da with SMTP id h13-20020a056902008d00b006bc47ea42damr8510163ybs.529.1664554948377; Fri, 30 Sep 2022 09:22:28 -0700 (PDT) In-Reply-To: <87a66haq6n.fsf@gmail.com> 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:244032 Archived-At: --000000000000690b5e05e9e7660f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 30, 2022 at 10:32 AM Robert Pluim wrote: > > >>>>> On Fri, 30 Sep 2022 09:49:30 -0400, Nikolaos Chatzikonstantinou said: > Nikolaos> +static unsigned int > Nikolaos> +key_file2_aux (Lisp_Object flags) > Nikolaos> +{ > Nikolaos> + unsigned int rv =3D 0; > Nikolaos> + Lisp_Object tail =3D flags; > Nikolaos> + FOR_EACH_TAIL_SAFE (tail) > Nikolaos> + { > Nikolaos> + Lisp_Object flag =3D XCAR (tail); > Nikolaos> + if (EQ (flag, Qgnutls_pkcs_plain)) > Nikolaos> + rv |=3D GNUTLS_PKCS_PLAIN; > Nikolaos> + else if(EQ (flag, Qgnutls_pkcs_pkcs12_3des)) > > Space after 'if' here and in the rest of the function > > Nikolaos> +# ifdef HAVE_GNUTLS_CERTIFICATE_SET_X509_KEY_FILE2 > Nikolaos> + if (STRINGP (pass)) > Nikolaos> + ret =3D gnutls_certificate_set_x509_key_file2 > Nikolaos> + (x509_cred, SSDATA (certfile), SSDATA (keyfile)= , file_format, > Nikolaos> + SSDATA (pass), key_file2_aux (flags)); > Nikolaos> + else if (NILP (pass) && plist_member (proplist, QCp= ass)) > Nikolaos> + ret =3D gnutls_certificate_set_x509_key_file2 > Nikolaos> + (x509_cred, SSDATA (certfile), SSDATA (keyfile)= , file_format, > Nikolaos> + NULL, key_file2_aux (flags)); > Nikolaos> + else > Nikolaos> + ret =3D gnutls_certificate_set_x509_key_file > Nikolaos> + (x509_cred, SSDATA (certfile), SSDATA (keyfile)= , file_format); > Nikolaos> +# else > Nikolaos> ret =3D gnutls_certificate_set_x509_key_file > Nikolaos> (x509_cred, SSDATA (certfile), SSDATA (keyfile), = file_format); > Nikolaos> +# endif > > 2 minor points: > > - If you use an intermediate variable for > the C version of pass, you can set it correctly based on `plist_member' > etc, and only have one call to _file2 (as it is it=CA=BCs kind of > difficult to quickly see the difference between the two calls) > - I think you can then rework the #else/#endif here to avoid repetition o= f > the call to the _file variant Thanks, I worked those out too, save for the last point you made. Do you mean this sort of thing: #if COND if (something) foo(); else bar(); #else bar(); #endif To be rewritten as #if COND if (something) foo(); else #endif bar(); Because in this case, I don't trust that kind of code to survive the test of time. Someone may come along and break it by modifying the bar() line, and it might be a sneaky bug. It's not easy to tell. --000000000000690b5e05e9e7660f Content-Type: text/x-patch; charset="US-ASCII"; name="0001-add-pass-and-flags-to-gnutls-boot-for-keylist.patch" Content-Disposition: attachment; filename="0001-add-pass-and-flags-to-gnutls-boot-for-keylist.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l8oovi730 RnJvbSA3OTY4MmRiNTJhODI1YzUyNDAzY2M2NzFjNWQ4NGEwYzY0NjBjZGY1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOaWtvbGFvcyBDaGF0emlrb25zdGFudGlub3UgPG5jaGF0ejMx NEBnbWFpbC5jb20+CkRhdGU6IE1vbiwgMjYgU2VwIDIwMjIgMTE6MDg6MTggLTA0MDAKU3ViamVj d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UZVTiAoImdudXRscy1ib290IiwgRmdudXRsc19ib290LCBTZ251dGxzX2Jvb3Qs IDMsIDMsIDAsCiAgIExpc3BfT2JqZWN0IGdsb2JhbF9pbml0OwogICBjaGFyIGNvbnN0ICpwcmlv cml0eV9zdHJpbmdfcHRyID0gIk5PUk1BTCI7IC8qIGRlZmF1bHQgcHJpb3JpdHkgc3RyaW5nLiAg Ki8KICAgY2hhciAqY19ob3N0bmFtZTsKKyAgY29uc3QgY2hhciAqY19wYXNzOwogCiAgIC8qIFBs YWNlaG9sZGVycyBmb3IgdGhlIHByb3BlcnR5IGxpc3QgZWxlbWVudHMuICAqLwogICBMaXNwX09i amVjdCBwcmlvcml0eV9zdHJpbmc7CiAgIExpc3BfT2JqZWN0IHRydXN0ZmlsZXM7CiAgIExpc3Bf T2JqZWN0IGNybGZpbGVzOwogICBMaXNwX09iamVjdCBrZXlsaXN0OworICBMaXNwX09iamVjdCBw YXNzOworICBMaXNwX09iamVjdCBmbGFnczsKICAgLyogTGlzcF9PYmplY3QgY2FsbGJhY2tzOyAq LwogICBMaXNwX09iamVjdCBsb2dsZXZlbDsKICAgTGlzcF9PYmplY3QgaG9zdG5hbWU7CkBAIC0x ODc3LDYgKzE5NjUsMTMgQEAgREVGVU4gKCJnbnV0bHMtYm9vdCIsIEZnbnV0bHNfYm9vdCwgU2du dXRsc19ib290LCAzLCAzLCAwLAogICBjcmxmaWxlcyAgICAgICAgICAgICAgPSBwbGlzdF9nZXQg KHByb3BsaXN0LCBRQ2NybGZpbGVzKTsKICAgbG9nbGV2ZWwgICAgICAgICAgICAgID0gcGxpc3Rf Z2V0IChwcm9wbGlzdCwgUUNsb2dsZXZlbCk7CiAgIHByaW1lX2JpdHMgICAgICAgICAgICA9IHBs aXN0X2dldCAocHJvcGxpc3QsIFFDbWluX3ByaW1lX2JpdHMpOworICBwYXNzICAgICAgICAgICAg ICAgICAgPSBwbGlzdF9nZXQgKHByb3BsaXN0LCBRQ3Bhc3MpOworICBmbGFncyA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