From e84e1c97458a7b0f449b6689caa0b3da2853f471 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 28 Aug 2014 17:38:22 -0400 Subject: More generic passphrase hashing code, including scrypt support Uses libscrypt when found; otherwise, we don't have scrypt and we only support openpgp rfc2440 s2k hashing, or pbkdf2. Includes documentation and unit tests; coverage around 95%. Remaining uncovered code is sanity-checks that shouldn't be reachable fwict. --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 414c72a42c..b93683fa8c 100644 --- a/configure.ac +++ b/configure.ac @@ -153,6 +153,9 @@ AC_ARG_ENABLE(tool-name-check, AC_ARG_ENABLE(seccomp, AS_HELP_STRING(--disable-seccomp, do not attempt to use libseccomp)) +AC_ARG_ENABLE(libscrypt, + AS_HELP_STRING(--disable-libscrypt, do not attempt to use libscrypt)) + dnl check for the correct "ar" when cross-compiling AN_MAKEVAR([AR], [AC_PROG_AR]) AN_PROGRAM([ar], [AC_PROG_AR]) @@ -721,6 +724,14 @@ if test "x$enable_seccomp" != "xno"; then AC_SEARCH_LIBS(seccomp_init, [seccomp]) fi +dnl ============================================================ +dnl Check for libscrypt + +if test "x$enable_libscrypt" != "xno"; then + AC_CHECK_HEADERS([libscrypt.h]) + AC_SEARCH_LIBS(libscrypt_scrypt, [scrypt]) +fi + dnl ============================================================ dnl We need an implementation of curve25519. -- cgit v1.2.3-54-g00ecf