From c499bd12f706df927bf3c6d6c21797aa065c4a52 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 22 Jul 2017 19:57:44 +0200 Subject: [PATCH] sodium ext: define crypto_aead_chacha20poly1305_ietf_KEYBYTES if needed Some old libsodium versions didn't had a dedicated constant for the IETF version of this construction. --- ext/sodium/libsodium.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/sodium/libsodium.c b/ext/sodium/libsodium.c index b61c21dad2..139b807366 100644 --- a/ext/sodium/libsodium.c +++ b/ext/sodium/libsodium.c @@ -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 -- 2.40.0