]> granicus.if.org Git - php/commitdiff
sodium ext: define crypto_aead_chacha20poly1305_ietf_KEYBYTES if needed
authorFrank Denis <github@pureftpd.org>
Sat, 22 Jul 2017 17:57:44 +0000 (19:57 +0200)
committerFrank Denis <github@pureftpd.org>
Sat, 22 Jul 2017 17:57:44 +0000 (19:57 +0200)
Some old libsodium versions didn't had a dedicated constant for the
IETF version of this construction.

ext/sodium/libsodium.c

index b61c21dad2ce219fd6e29f9ddb1f15f17c4b8a4f..139b8073661e2d6518a0a603f52a113fe270796e 100644 (file)
@@ -175,6 +175,10 @@ ZEND_END_ARG_INFO()
 # define HAVE_AESGCM 1
 #endif
 
+#ifndef crypto_aead_chacha20poly1305_ietf_KEYBYTES
+# define crypto_aead_chacha20poly1305_ietf_KEYBYTES crypto_aead_chacha20poly1305_KEYBYTES
+#endif
+
 const zend_function_entry sodium_functions[] = {
        PHP_FE(sodium_crypto_aead_aes256gcm_is_available, AI_None)
 #ifdef HAVE_AESGCM