@@ -5885,14 +5885,74 @@ as_fn_error $? "can't find openssl >= 1.0.1 crypto lib
58855885See \` config.log' for more details" " $LINENO " 5; }
58865886fi
58875887
5888+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for library containing EVP_chacha20_poly1305" >&5
5889+ $as_echo_n " checking for library containing EVP_chacha20_poly1305... " >&6 ; }
5890+ if ${ac_cv_search_EVP_chacha20_poly1305+: } false ; then :
5891+ $as_echo_n " (cached) " >&6
5892+ else
5893+ ac_func_search_save_LIBS=$LIBS
5894+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
5895+ /* end confdefs.h. */
5896+
5897+ /* Override any GCC internal prototype to avoid an error.
5898+ Use char because int might match the return type of a GCC
5899+ builtin and then its argument prototype would still apply. */
5900+ #ifdef __cplusplus
5901+ extern "C"
5902+ #endif
5903+ char EVP_chacha20_poly1305 ();
5904+ int
5905+ main ()
5906+ {
5907+ return EVP_chacha20_poly1305 ();
5908+ ;
5909+ return 0;
5910+ }
5911+ _ACEOF
5912+ for ac_lib in ' ' crypto; do
5913+ if test -z " $ac_lib " ; then
5914+ ac_res=" none required"
5915+ else
5916+ ac_res=-l$ac_lib
5917+ LIBS=" -l$ac_lib $ac_func_search_save_LIBS "
5918+ fi
5919+ if ac_fn_c_try_link " $LINENO " ; then :
5920+ ac_cv_search_EVP_chacha20_poly1305=$ac_res
5921+ fi
5922+ rm -f core conftest.err conftest.$ac_objext \
5923+ conftest$ac_exeext
5924+ if ${ac_cv_search_EVP_chacha20_poly1305+: } false ; then :
5925+ break
5926+ fi
5927+ done
5928+ if ${ac_cv_search_EVP_chacha20_poly1305+: } false ; then :
5929+
5930+ else
5931+ ac_cv_search_EVP_chacha20_poly1305=no
5932+ fi
5933+ rm conftest.$ac_ext
5934+ LIBS=$ac_func_search_save_LIBS
5935+ fi
5936+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_search_EVP_chacha20_poly1305 " >&5
5937+ $as_echo " $ac_cv_search_EVP_chacha20_poly1305 " >&6 ; }
5938+ ac_res=$ac_cv_search_EVP_chacha20_poly1305
5939+ if test " $ac_res " ! = no; then :
5940+ test " $ac_res " = " none required" || LIBS=" $ac_res $LIBS "
5941+
5942+
5943+ $as_echo " #define CHAPOLY 1" >> confdefs.h
5944+
5945+ CHAPOLY_OBJ=" crypto/cipher/chacha20_poly1305_ossl.o"
5946+ fi
5947+
58885948
58895949
58905950$as_echo " #define GCM 1" >> confdefs.h
58915951
58925952
58935953$as_echo " #define OPENSSL 1" >> confdefs.h
58945954
5895- AES_ICM_OBJS=" crypto/cipher/aes_icm_ossl.o crypto/cipher/aes_gcm_ossl.o"
5955+ AES_ICM_OBJS=" crypto/cipher/aes_icm_ossl.o crypto/cipher/aes_gcm_ossl.o $CHAPOLY_OBJ "
58965956 HMAC_OBJS=crypto/hash/hmac_ossl.o
58975957 USE_EXTERNAL_CRYPTO=1
58985958
@@ -6285,9 +6345,12 @@ fi
62856345$as_echo " #define GCM 1" >> confdefs.h
62866346
62876347
6348+ $as_echo " #define CHAPOLY 1" >> confdefs.h
6349+
6350+
62886351$as_echo " #define NSS 1" >> confdefs.h
62896352
6290- AES_ICM_OBJS=" crypto/cipher/aes_icm_nss.o crypto/cipher/aes_gcm_nss.o"
6353+ AES_ICM_OBJS=" crypto/cipher/aes_icm_nss.o crypto/cipher/aes_gcm_nss.o crypto/cipher/chacha20_poly1305_nss.o "
62916354
62926355 # TODO(RLB): Use NSS for HMAC
62936356 HMAC_OBJS=" crypto/hash/hmac.o crypto/hash/sha1.o"
0 commit comments