I’m trying to use SQLCipher.
I started by compiling OpenSSL to obtain libcrypto.a.
I them compiled SQLCipher with success configuring it like
./configure --enable-tempstore=yes
CFLAGS="-DSQLITE_HAS_CODEC"
LDFLAGS="…/…/extref/libopenssl_bin/X86/release/libcrypto.a"
I them compiled my application but I got the folowing errors.
/extref/libsqlcipher_bin/X86/release/libsqlcipher.a(sqlite3.o): In function sqlcipher_openssl_activate': sqlite3.c:(.text+0x3f82): undefined reference to
OPENSSL_add_all_algorithms_noconf’
./extref/libsqlcipher_bin/X86/release/libsqlcipher.a(sqlite3.o): In function sqlcipher_openssl_deactivate': sqlite3.c:(.text+0x4002): undefined reference to
EVP_cleanup’
./extref/libsqlcipher_bin/X86/release/libsqlcipher.a(sqlite3.o): In function sqlcipher_openssl_hmac': sqlite3.c:(.text+0x40a7): undefined reference to
HMAC_CTX_init’
sqlite3.c:(.text+0x4139): undefined reference to HMAC_CTX_cleanup' ./extref/libsqlcipher_bin/X86/release/libsqlcipher.a(sqlite3.o): In function
sqlcipher_openssl_cipher’:
sqlite3.c:(.text+0x426f): undefined eference to `EVP_CIPHER_CTX_cleanup’.
After searching the internet, I’ve tried to compile SQLCipher by indicating the locatioin of the include files by configuring it like:
./configure --enable-tempstore=yes
CFLAGS="-DSQLITE_HAS_CODEC -I…/…/extref/libopenssl_bin/include"
LDFLAGS="…/…/extref/libopenssl_bin/X86/release/libcrypto.a"
But them I got these errors compiling SQLCypher:
sqlite3.c: In function ‘sqlcipher_openssl_hmac’:
sqlite3.c:18401: error: storage size of ‘hctx’ isn’t known
sqlite3.c: In function ‘sqlcipher_openssl_cipher’:
sqlite3.c:18418: error: storage size of ‘ectx’ isn’t known
Can someone help me solving these errors?
Thanks