Browse Source

configure: Check for lower-case IETF acronym in sodium constants

The v1.0.9 release of libsodium added
crypto_aead_chacha20poly1305_ietf_NPUBBYTES which we use; before that it was
...IETF_NPUBBYTES.

Since that release was in April 2016, it seems fair to simply check for
ancient versions and use the internal one if found. The alternative would be
to use the older names (which are still in the header), but given we've never
tested with such old versions, this seems safer.

Reported-by: Zoltán Gálli <@gallizoltan>
Signed-off-by: Christian Decker <decker.christian@gmail.com>
issue-2504
Christian Decker 6 years ago
committed by Rusty Russell
parent
commit
5518c7cba8
  1. 1
      configure

1
configure

@ -168,6 +168,7 @@ code=
int main(void) int main(void)
{ {
printf("%p\n", crypto_aead_chacha20poly1305_ietf_encrypt); printf("%p\n", crypto_aead_chacha20poly1305_ietf_encrypt);
printf("%d\n", crypto_aead_chacha20poly1305_ietf_NPUBBYTES);
exit(0); exit(0);
} }
/*END*/ /*END*/

Loading…
Cancel
Save