File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -264,11 +264,19 @@ if test "$crypto_lib" = "libtomcrypt"; then
264264 AC_CHECK_LIB ( [ tomcrypt] , [ register_cipher] , ,
265265 AC_MSG_ERROR ( [ Library crypto not found. Install libtomcrypt!"] ) )
266266else
267- CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
268- BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
269- AC_MSG_RESULT ( [ openssl] )
270- AC_CHECK_LIB ( [ crypto] , [ HMAC_Init_ex] , ,
271- AC_MSG_ERROR ( [ Library crypto not found. Install openssl!"] ) )
267+ if test "$crypto_lib" = "commoncrypto"; then
268+ CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_CC"
269+ BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_CC"
270+ AC_MSG_RESULT ( [ commoncrypto] )
271+ AC_CHECK_LIB ( [ crypto] , [ HMAC_Init_ex] , ,
272+ AC_MSG_ERROR ( [ Library crypto not found. Install openssl!"] ) )
273+ else
274+ CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
275+ BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
276+ AC_MSG_RESULT ( [ openssl] )
277+ AC_CHECK_LIB ( [ crypto] , [ HMAC_Init_ex] , ,
278+ AC_MSG_ERROR ( [ Library crypto not found. Install openssl!"] ) )
279+ fi
272280fi
273281
274282# #########
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ void sqlcipher_activate() {
9494 sqlite3_mutex_enter (sqlite3MutexAlloc (SQLITE_MUTEX_STATIC_MASTER ));
9595 p = sqlcipher_malloc (sizeof (sqlcipher_provider ));
9696 {
97- #ifdef SQLCIPHER_CRYPTO_OPENSSL
97+ #if defined ( SQLCIPHER_CRYPTO_OPENSSL ) && !defined ( SQLCIPHER_CRYPTO_CC )
9898 extern int sqlcipher_openssl_setup (sqlcipher_provider * p );
9999 sqlcipher_openssl_setup (p );
100100#elif SQLCIPHER_CRYPTO_LIBTOMCRYPT
You can’t perform that action at this time.
0 commit comments