Merge branch 'prerelease' of github.com:sqlcipher/sqlcipher into prerelease

This commit is contained in:
Stephen Lombardo 2013-06-12 15:21:07 -04:00
commit 9b1a92181a
4 changed files with 6 additions and 55 deletions

49
configure vendored
View File

@ -10665,57 +10665,10 @@ fi
else else
if test "$crypto_lib" = "commoncrypto"; then if test "$crypto_lib" = "commoncrypto"; then
CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_CC" CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_CC" BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_CC"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: commoncrypto" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: commoncrypto" >&5
$as_echo "commoncrypto" >&6; } $as_echo "commoncrypto" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Init_ex in -lcrypto" >&5
$as_echo_n "checking for HMAC_Init_ex in -lcrypto... " >&6; }
if ${ac_cv_lib_crypto_HMAC_Init_ex+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypto $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char HMAC_Init_ex ();
int
main ()
{
return HMAC_Init_ex ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_crypto_HMAC_Init_ex=yes
else
ac_cv_lib_crypto_HMAC_Init_ex=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Init_ex" >&5
$as_echo "$ac_cv_lib_crypto_HMAC_Init_ex" >&6; }
if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCRYPTO 1
_ACEOF
LIBS="-lcrypto $LIBS"
else
as_fn_error $? "Library crypto not found. Install openssl!\"" "$LINENO" 5
fi
else else
CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL" CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL" BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"

View File

@ -265,11 +265,9 @@ if test "$crypto_lib" = "libtomcrypt"; then
AC_MSG_ERROR([Library crypto not found. Install libtomcrypt!"])) AC_MSG_ERROR([Library crypto not found. Install libtomcrypt!"]))
else else
if test "$crypto_lib" = "commoncrypto"; then if test "$crypto_lib" = "commoncrypto"; then
CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_CC" CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_CC" BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_CC"
AC_MSG_RESULT([commoncrypto]) AC_MSG_RESULT([commoncrypto])
AC_CHECK_LIB([crypto], [HMAC_Init_ex], ,
AC_MSG_ERROR([Library crypto not found. Install openssl!"]))
else else
CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL" CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL" BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"

View File

@ -95,10 +95,10 @@ void sqlcipher_activate() {
#if defined (SQLCIPHER_CRYPTO_CC) #if defined (SQLCIPHER_CRYPTO_CC)
extern int sqlcipher_cc_setup(sqlcipher_provider *p); extern int sqlcipher_cc_setup(sqlcipher_provider *p);
sqlcipher_cc_setup(p); sqlcipher_cc_setup(p);
#elif SQLCIPHER_CRYPTO_LIBTOMCRYPT #elif defined (SQLCIPHER_CRYPTO_LIBTOMCRYPT)
extern int sqlcipher_ltc_setup(sqlcipher_provider *p); extern int sqlcipher_ltc_setup(sqlcipher_provider *p);
sqlcipher_ltc_setup(p); sqlcipher_ltc_setup(p);
#elif SQLCIPHER_CRYPTO_OPENSSL #elif defined (SQLCIPHER_CRYPTO_OPENSSL)
extern int sqlcipher_openssl_setup(sqlcipher_provider *p); extern int sqlcipher_openssl_setup(sqlcipher_provider *p);
sqlcipher_openssl_setup(p); sqlcipher_openssl_setup(p);
#else #else