Error in configure for creating encripted sqlite 3.11.0


#1

Hi

I´m trying next configuration through MinGW, with OpenSSL ver 1.1.0, 32 bits

./configure --disable-tcl --disable-amalgamation CFLAGS="-DSQLITE_HAS_CODEC -I/c/OpenSSL-Win32/include" LDFLAGS="-L/c/OpenSSL-Win32/bin -l/c/OpenSSL-Win32/lib/MinGW"

The execution return next error. How avoid it?

checking for crypto library to use… openssl
checking for HMAC_Init_ex in -lcrypto… no
configure: error: Library crypto not found. Install openssl!"

Thanks for your attention


#2

Hi @jocaro

You will want to include in your ./configure phase: --with-crypto-lib=none. With your CFLAGS, you will want to include -DSQLCIPHER_CRYPTO_OPENSSL.


#3

Hi

Configure completed successfully, but make with errors

$ ./configure --disable-tcl --disable-amalgamation --with-crypto-lib=none CFLAGS="-DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/OpenSSL-Win32/include" LDFLAGS="-L/c/OpenSSL-Win32/bin"

$ make

After many compiled files, fails

./libtool --mode=compile --tag=CC gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPEN
SSL -I/c/OpenSSL-Win32/include -DSQLITE_OS_WIN=1 -I. -I/c/PruebaCifrado/src -I/c
/PruebaCifrado/ext/rtree -I/c/PruebaCifrado/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DB
UILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -c /c/PruebaCifrado/src/crypto.c
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/OpenSS
L-Win32/include -DSQLITE_OS_WIN=1 -I. -I/c/PruebaCifrado/src -I/c/PruebaCifrado/
ext/rtree -I/c/PruebaCifrado/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DN
DEBUG -DSQLITE_THREADSAFE=1 -c /c/PruebaCifrado/src/crypto.c -DDLL_EXPORT -DPIC
-o .libs/crypto.o
In file included from c:/PruebaCifrado/src/crypto.c:37:0:
c:/PruebaCifrado/src/crypto.h:239:12: warning: 'sqlcipher_codec_get_store_pass’
used but never defined
static int sqlcipher_codec_get_store_pass(codec_ctx *ctx);
^
c:/PruebaCifrado/src/crypto.h:240:13: warning: ‘sqlcipher_codec_get_pass’ used b
ut never defined
static void sqlcipher_codec_get_pass(codec_ctx *ctx, void **zKey, int nKey);
^
c:/PruebaCifrado/src/crypto.h:241:13: warning: 'sqlcipher_codec_set_store_pass’
used but never defined
static void sqlcipher_codec_set_store_pass(codec_ctx ctx, int value);
^
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/OpenSS
L-Win32/include -DSQLITE_OS_WIN=1 -I. -I/c/PruebaCifrado/src -I/c/PruebaCifrado/
ext/rtree -I/c/PruebaCifrado/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DN
DEBUG -DSQLITE_THREADSAFE=1 -c /c/PruebaCifrado/src/crypto.c -o crypto.o >/dev/n
ull 2>&1
./libtool --mode=compile --tag=CC gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPEN
SSL -I/c/OpenSSL-Win32/include -DSQLITE_OS_WIN=1 -I. -I/c/PruebaCifrado/src -I/c
/PruebaCifrado/ext/rtree -I/c/PruebaCifrado/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DB
UILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -c /c/PruebaCifrado/src/crypto_im
pl.c
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/OpenSS
L-Win32/include -DSQLITE_OS_WIN=1 -I. -I/c/PruebaCifrado/src -I/c/PruebaCifrado/
ext/rtree -I/c/PruebaCifrado/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DN
DEBUG -DSQLITE_THREADSAFE=1 -c /c/PruebaCifrado/src/crypto_impl.c -DDLL_EXPORT
-DPIC -o .libs/crypto_impl.o
c:/PruebaCifrado/src/crypto_impl.c: In function ‘sqlcipher_codec_ctx_migrate’:
c:/PruebaCifrado/src/crypto_impl.c:1141:7: warning: implicit declaration of func
tion ‘sqlite3CodecGetKey’ [-Wimplicit-function-declaration]
sqlite3CodecGetKey(db, db->nDb - 1, (void
)&key, &password_sz);
^
c:/PruebaCifrado/src/crypto_impl.c:1142:7: warning: implicit declaration of func
tion ‘sqlite3CodecAttach’ [-Wimplicit-function-declaration]
sqlite3CodecAttach(db, 0, key, password_sz);
^
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/OpenSS
L-Win32/include -DSQLITE_OS_WIN=1 -I. -I/c/PruebaCifrado/src -I/c/PruebaCifrado/
ext/rtree -I/c/PruebaCifrado/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DN
DEBUG -DSQLITE_THREADSAFE=1 -c /c/PruebaCifrado/src/crypto_impl.c -o crypto_impl
.o >/dev/null 2>&1
./libtool --mode=compile --tag=CC gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPEN
SSL -I/c/OpenSSL-Win32/include -DSQLITE_OS_WIN=1 -I. -I/c/PruebaCifrado/src -I/c
/PruebaCifrado/ext/rtree -I/c/PruebaCifrado/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DB
UILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -c /c/PruebaCifrado/src/crypto_op
enssl.c
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/OpenSS
L-Win32/include -DSQLITE_OS_WIN=1 -I. -I/c/PruebaCifrado/src -I/c/PruebaCifrado/
ext/rtree -I/c/PruebaCifrado/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DN
DEBUG -DSQLITE_THREADSAFE=1 -c /c/PruebaCifrado/src/crypto_openssl.c -DDLL_EXPO
RT -DPIC -o .libs/crypto_openssl.o
c:/PruebaCifrado/src/crypto_openssl.c: In function ‘sqlcipher_openssl_hmac’:
c:/PruebaCifrado/src/crypto_openssl.c:158:12: error: storage size of ‘hctx’ isn’
t known
HMAC_CTX hctx;
^
c:/PruebaCifrado/src/crypto_openssl.c:160:3: warning: implicit declaration of fu
nction ‘HMAC_CTX_init’ [-Wimplicit-function-declaration]
HMAC_CTX_init(&hctx);
^
c:/PruebaCifrado/src/crypto_openssl.c:165:3: warning: implicit declaration of fu
nction ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
HMAC_CTX_cleanup(&hctx);
^
c:/PruebaCifrado/src/crypto_openssl.c: In function ‘sqlcipher_openssl_cipher’:
c:/PruebaCifrado/src/crypto_openssl.c:175:18: error: storage size of ‘ectx’ isn’
t known
EVP_CIPHER_CTX ectx;
^
make: *** [crypto_openssl.lo] Error 1

Usr@PC-Usr /c/PruebaCifrado
$