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: Tue, 18 Jul 2017 13:44:14 -0700 Organization: UCLA Computer Science Department Message-ID: 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> <3f44fabe-80b7-8a01-2b64-0a33b2a311b3@cs.ucla.edu> <02lgnm1zjh.fsf@fencepost.gnu.org> <22246710-dc3b-f146-1812-cc374a709f0b@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------56E3DF46C578D6A1876CD803" X-Trace: blaine.gmane.org 1500410723 10044 195.159.176.226 (18 Jul 2017 20:45:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Jul 2017 20:45:23 +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 Tue Jul 18 22:45:16 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 1dXZMm-00026j-Rw for ged-emacs-devel@m.gmane.org; Tue, 18 Jul 2017 22:45:12 +0200 Original-Received: from localhost ([::1]:58560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXZMs-0001lj-9d for ged-emacs-devel@m.gmane.org; Tue, 18 Jul 2017 16:45:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXZM2-0001h0-67 for emacs-devel@gnu.org; Tue, 18 Jul 2017 16:44:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXZLz-0000Bd-45 for emacs-devel@gnu.org; Tue, 18 Jul 2017 16:44:26 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54836) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dXZLy-00005R-U7; Tue, 18 Jul 2017 16:44:23 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E5BD31601D2; Tue, 18 Jul 2017 13:44:20 -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 JD9FI2WrsxyI; Tue, 18 Jul 2017 13:44:20 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 33A671601DB; Tue, 18 Jul 2017 13:44:20 -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 EjIv1BtBw_6q; Tue, 18 Jul 2017 13:44:20 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.184.153]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0A8E51600F5; Tue, 18 Jul 2017 13:44:20 -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:216861 Archived-At: This is a multi-part message in MIME format. --------------56E3DF46C578D6A1876CD803 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Glenn Morris wrote: > I was using ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.21.tar.x= z Weird, because I was looking at the same source code. It does not build u= nder=20 recent Ubuntu or Fedora, so I did not compile it: I just looked at the so= urce=20 code. Its implementation of gnutls_cipher_list appears to be straightforw= ard: it=20 adds only values found as the 'id' component of an entry in the 'algorith= ms'=20 array in lib/algorithms/ciphers.c. None of these values are=20 GNUTLS_CIPHER_UNKNOWN, so gnutls_cipher_list cannot possibly return an ar= ray=20 containing GNUTLS_CIPHER_UNKNOWN. For example, on my platform, if I compile and run the attached program vi= a: gcc gs.c -lgnutls ./a.out the program silently succeeds. What happens on your platform? --------------56E3DF46C578D6A1876CD803 Content-Type: text/x-csrc; name="gs.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gs.c" #include #include int main (void) { const gnutls_cipher_algorithm_t *gciphers =3D gnutls_cipher_list (); for (int pos =3D 0; gciphers[pos] !=3D 0; pos++) { gnutls_cipher_algorithm_t gca =3D gciphers[pos]; if (gca =3D=3D GNUTLS_CIPHER_UNKNOWN) return printf ("gciphers[%d] =3D=3D GNUTLS_CIPHER_UNKNOWN ?!?\n", pos), = 1; } return 0; } --------------56E3DF46C578D6A1876CD803--