diff --git a/configure b/configure index e381273f..30553433 100755 --- a/configure +++ b/configure @@ -13218,8 +13218,8 @@ else fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbedtls support Cipher Feedback mode or not" >&5 -$as_echo_n "checking whether mbedtls support Cipher Feedback mode or not... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbedtls supports Cipher Feedback mode or not" >&5 +$as_echo_n "checking whether mbedtls supports Cipher Feedback mode or not... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13248,6 +13248,94 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbedtls supports the ARC4 stream cipher or not" >&5 +$as_echo_n "checking whether mbedtls supports the ARC4 stream cipher or not... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ + +#ifndef MBEDTLS_ARC4_C +#error the ARC4 stream cipher not supported by your mbed TLS. +#endif + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +else + as_fn_error $? "MBEDTLS_ARC4_C required" "$LINENO" 5 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbedtls supports the Blowfish block cipher or not" >&5 +$as_echo_n "checking whether mbedtls supports the Blowfish block cipher or not... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ + +#ifndef MBEDTLS_BLOWFISH_C +#error the Blowfish block cipher not supported by your mbed TLS. +#endif + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +else + as_fn_error $? "MBEDTLS_BLOWFISH_C required" "$LINENO" 5 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbedtls supports the Camellia block cipher or not" >&5 +$as_echo_n "checking whether mbedtls supports the Camellia block cipher or not... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ + +#ifndef MBEDTLS_CAMELLIA_C +#error the Camellia block cipher not supported by your mbed TLS. +#endif + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +else + as_fn_error $? "MBEDTLS_CAMELLIA_C required" "$LINENO" 5 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + $as_echo "#define USE_CRYPTO_MBEDTLS 1" >>confdefs.h ;; diff --git a/m4/mbedtls.m4 b/m4/mbedtls.m4 index 8a8c8b52..eaf0d62b 100644 --- a/m4/mbedtls.m4 +++ b/m4/mbedtls.m4 @@ -27,7 +27,7 @@ AC_DEFUN([ss_MBEDTLS], [AC_MSG_ERROR([mbed TLS libraries not found.])] ) - AC_MSG_CHECKING([whether mbedtls support Cipher Feedback mode or not]) + AC_MSG_CHECKING([whether mbedtls supports Cipher Feedback mode or not]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ @@ -42,4 +42,53 @@ AC_DEFUN([ss_MBEDTLS], [AC_MSG_RESULT([ok])], [AC_MSG_ERROR([MBEDTLS_CIPHER_MODE_CFB required])] ) + + + AC_MSG_CHECKING([whether mbedtls supports the ARC4 stream cipher or not]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include + ]], + [[ +#ifndef MBEDTLS_ARC4_C +#error the ARC4 stream cipher not supported by your mbed TLS. +#endif + ]] + )], + [AC_MSG_RESULT([ok])], + [AC_MSG_ERROR([MBEDTLS_ARC4_C required])] + ) + + AC_MSG_CHECKING([whether mbedtls supports the Blowfish block cipher or not]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include + ]], + [[ +#ifndef MBEDTLS_BLOWFISH_C +#error the Blowfish block cipher not supported by your mbed TLS. +#endif + ]] + )], + [AC_MSG_RESULT([ok])], + [AC_MSG_ERROR([MBEDTLS_BLOWFISH_C required])] + ) + + AC_MSG_CHECKING([whether mbedtls supports the Camellia block cipher or not]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include + ]], + [[ +#ifndef MBEDTLS_CAMELLIA_C +#error the Camellia block cipher not supported by your mbed TLS. +#endif + ]] + )], + [AC_MSG_RESULT([ok])], + [AC_MSG_ERROR([MBEDTLS_CAMELLIA_C required])] + ) ])