emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 583995c: GnuTLS HMAC and symmetric cipher support


From: Paul Eggert
Subject: Re: master 583995c: GnuTLS HMAC and symmetric cipher support
Date: Tue, 18 Jul 2017 14:16:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Glenn Morris wrote:
Your example doesn't correspond to how the code in Emacs used to be.
Change it to:

   for (int pos = 0; gciphers[pos] != GNUTLS_CIPHER_NULL; pos++)

and it fails for me, just as Emacs used to:

Weirder and weirder. First, with that change the code still works for me (I tried it with GnuTLS 3.4.10). Second, if I read the GnuTLS 3.2.21 source code, the changed code should still work for you too. This is because the test gciphers[pos] != GNUTLS_CIPHER_NULL should succeed one iteration before the test gciphers[pos] != 0 succeeds.


   gciphers[17] == GNUTLS_CIPHER_UNKNOWN ?!?

As I said, it seems to be a happy accident that GNUTLS_CIPHER_UNKNOWN == 0.
So your example as written happens to skip it.

I hope we have now established I'm not mad or lying... :)

Sorry, not established yet. :-) Quite possibly I'm the crazy one, of course. Still, there's something very odd going on here.

To make sure we're on the same page I am attaching the changed code, which still works for me.

Attachment: gs1.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]