Skip to content

Commit c499bd1

Browse files
committed
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.
1 parent 8a2e747 commit c499bd1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/sodium/libsodium.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ ZEND_END_ARG_INFO()
175175
# define HAVE_AESGCM 1
176176
#endif
177177

178+
#ifndef crypto_aead_chacha20poly1305_ietf_KEYBYTES
179+
# define crypto_aead_chacha20poly1305_ietf_KEYBYTES crypto_aead_chacha20poly1305_KEYBYTES
180+
#endif
181+
178182
const zend_function_entry sodium_functions[] = {
179183
PHP_FE(sodium_crypto_aead_aes256gcm_is_available, AI_None)
180184
#ifdef HAVE_AESGCM

0 commit comments

Comments
 (0)