From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: master 583995c: GnuTLS HMAC and symmetric cipher support Date: Mon, 17 Jul 2017 14:58:44 -0700 Organization: UCLA Computer Science Department Message-ID: <3f44fabe-80b7-8a01-2b64-0a33b2a311b3@cs.ucla.edu> References: <20170714150706.13106.18905@vcs0.savannah.gnu.org> <20170714150707.5E9B322DF8@vcs0.savannah.gnu.org> <87eftfdu5g.fsf@lifelogs.com> <7kzic356o4.fsf@fencepost.gnu.org> <34d18yexh0.fsf@fencepost.gnu.org> <2ztw2auan0.fsf@fencepost.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1500328736 7370 195.159.176.226 (17 Jul 2017 21:58:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Jul 2017 21:58:56 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Cc: Emacs developers , Noam Postavsky To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 17 23:58:52 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXE2V-0001fF-Cs for ged-emacs-devel@m.gmane.org; Mon, 17 Jul 2017 23:58:51 +0200 Original-Received: from localhost ([::1]:52742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXE2b-0003Mt-2U for ged-emacs-devel@m.gmane.org; Mon, 17 Jul 2017 17:58:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXE2U-0003Mn-K3 for emacs-devel@gnu.org; Mon, 17 Jul 2017 17:58:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXE2R-00089C-IM for emacs-devel@gnu.org; Mon, 17 Jul 2017 17:58:50 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34166) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dXE2R-00088O-Bs; Mon, 17 Jul 2017 17:58:47 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 73BBF160218; Mon, 17 Jul 2017 14:58:45 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id aY_LCh9MK1tL; Mon, 17 Jul 2017 14:58:44 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BB745160228; Mon, 17 Jul 2017 14:58:44 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id di6zGe-z7E1k; Mon, 17 Jul 2017 14:58:44 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.184.153]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9A88D160218; Mon, 17 Jul 2017 14:58:44 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216806 Archived-At: Glenn Morris wrote: > Seems a bit like a happy accident?): It's not an accident, as every valid cipher etc. has a name. > 1. Fgnutls_ciphers. Can intern NULL and crash. > const gnutls_cipher_algorithm_t *gciphers =3D gnutls_cipher_list (); > for (ptrdiff_t pos =3D 0; gciphers[pos] !=3D GNUTLS_CIPHER_NULL; pos++) > { > gnutls_cipher_algorithm_t gca =3D gciphers[pos]; > Lisp_Object cipher_symbol =3D intern (gnutls_cipher_get_name (gca)); > ... > } It's OK, as every cipher other than GNUTLS_CIPHER_NULL has a non-NULL nam= e. > 2. Fgnutls_macs. > const gnutls_mac_algorithm_t *macs =3D gnutls_mac_list (); > for (ptrdiff_t pos =3D 0; macs[pos] !=3D 0; pos++) > { > const gnutls_mac_algorithm_t gma =3D macs[pos]; > Lisp_Object gma_symbol =3D intern (gnutls_mac_get_name (gma)); > ... > } Also OK, as every mac algorithm has a non-NULL name. > 3. Fgnutls_digests. > const gnutls_digest_algorithm_t *digests =3D gnutls_digest_list (); > for (ptrdiff_t pos =3D 0; digests[pos] !=3D 0; pos++) > { > const gnutls_digest_algorithm_t gda =3D digests[pos]; > Lisp_Object gda_symbol =3D intern (gnutls_digest_get_name (gda)); > ... > } Likewise.