diff --git a/src/crypto_cc.c b/src/crypto_cc.c index 647f5b3..a800830 100644 --- a/src/crypto_cc.c +++ b/src/crypto_cc.c @@ -154,14 +154,6 @@ static int sqlcipher_cc_get_hmac_sz(void *ctx, int algorithm) { } } -static int sqlcipher_cc_ctx_copy(void *target_ctx, void *source_ctx) { - return SQLITE_OK; -} - -static int sqlcipher_cc_ctx_cmp(void *c1, void *c2) { - return 1; /* always indicate contexts are the same */ -} - static int sqlcipher_cc_ctx_init(void **ctx) { return SQLITE_OK; } @@ -185,8 +177,6 @@ int sqlcipher_cc_setup(sqlcipher_provider *p) { p->get_iv_sz = sqlcipher_cc_get_iv_sz; p->get_block_sz = sqlcipher_cc_get_block_sz; p->get_hmac_sz = sqlcipher_cc_get_hmac_sz; - p->ctx_copy = sqlcipher_cc_ctx_copy; - p->ctx_cmp = sqlcipher_cc_ctx_cmp; p->ctx_init = sqlcipher_cc_ctx_init; p->ctx_free = sqlcipher_cc_ctx_free; p->add_random = sqlcipher_cc_add_random; diff --git a/src/crypto_libtomcrypt.c b/src/crypto_libtomcrypt.c index efb24fd..9e1e50c 100644 --- a/src/crypto_libtomcrypt.c +++ b/src/crypto_libtomcrypt.c @@ -250,14 +250,6 @@ static int sqlcipher_ltc_get_hmac_sz(void *ctx, int algorithm) { return hash_descriptor[hash_idx].hashsize; } -static int sqlcipher_ltc_ctx_copy(void *target_ctx, void *source_ctx) { - return SQLITE_OK; -} - -static int sqlcipher_ltc_ctx_cmp(void *c1, void *c2) { - return 1; -} - static int sqlcipher_ltc_ctx_init(void **ctx) { sqlcipher_ltc_activate(NULL); return SQLITE_OK; @@ -285,8 +277,6 @@ int sqlcipher_ltc_setup(sqlcipher_provider *p) { p->get_iv_sz = sqlcipher_ltc_get_iv_sz; p->get_block_sz = sqlcipher_ltc_get_block_sz; p->get_hmac_sz = sqlcipher_ltc_get_hmac_sz; - p->ctx_copy = sqlcipher_ltc_ctx_copy; - p->ctx_cmp = sqlcipher_ltc_ctx_cmp; p->ctx_init = sqlcipher_ltc_ctx_init; p->ctx_free = sqlcipher_ltc_ctx_free; p->add_random = sqlcipher_ltc_add_random; diff --git a/src/crypto_openssl.c b/src/crypto_openssl.c index 3662b7d..bd75ed5 100644 --- a/src/crypto_openssl.c +++ b/src/crypto_openssl.c @@ -323,15 +323,6 @@ static int sqlcipher_openssl_get_hmac_sz(void *ctx, int algorithm) { } } -static int sqlcipher_openssl_ctx_copy(void *target_ctx, void *source_ctx) { - memcpy(target_ctx, source_ctx, sizeof(openssl_ctx)); - return SQLITE_OK; -} - -static int sqlcipher_openssl_ctx_cmp(void *c1, void *c2) { - return ((openssl_ctx *)c1)->evp_cipher == ((openssl_ctx *)c2)->evp_cipher; -} - static int sqlcipher_openssl_ctx_init(void **ctx) { openssl_ctx *o_ctx; @@ -371,8 +362,6 @@ int sqlcipher_openssl_setup(sqlcipher_provider *p) { p->get_iv_sz = sqlcipher_openssl_get_iv_sz; p->get_block_sz = sqlcipher_openssl_get_block_sz; p->get_hmac_sz = sqlcipher_openssl_get_hmac_sz; - p->ctx_copy = sqlcipher_openssl_ctx_copy; - p->ctx_cmp = sqlcipher_openssl_ctx_cmp; p->ctx_init = sqlcipher_openssl_ctx_init; p->ctx_free = sqlcipher_openssl_ctx_free; p->add_random = sqlcipher_openssl_add_random; diff --git a/src/sqlcipher.h b/src/sqlcipher.h index 2402d02..e8bda8e 100644 --- a/src/sqlcipher.h +++ b/src/sqlcipher.h @@ -65,8 +65,6 @@ typedef struct { int (*get_iv_sz)(void *ctx); int (*get_block_sz)(void *ctx); int (*get_hmac_sz)(void *ctx, int algorithm); - int (*ctx_copy)(void *target_ctx, void *source_ctx); - int (*ctx_cmp)(void *c1, void *c2); int (*ctx_init)(void **ctx); int (*ctx_free)(void **ctx); int (*fips_status)(void *ctx);