Skip to content

Commit 2ced136

Browse files
committed
remove unused functions from provider interface
1 parent 8319ae0 commit 2ced136

4 files changed

Lines changed: 0 additions & 33 deletions

File tree

src/crypto_cc.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,6 @@ static int sqlcipher_cc_get_hmac_sz(void *ctx, int algorithm) {
154154
}
155155
}
156156

157-
static int sqlcipher_cc_ctx_copy(void *target_ctx, void *source_ctx) {
158-
return SQLITE_OK;
159-
}
160-
161-
static int sqlcipher_cc_ctx_cmp(void *c1, void *c2) {
162-
return 1; /* always indicate contexts are the same */
163-
}
164-
165157
static int sqlcipher_cc_ctx_init(void **ctx) {
166158
return SQLITE_OK;
167159
}
@@ -185,8 +177,6 @@ int sqlcipher_cc_setup(sqlcipher_provider *p) {
185177
p->get_iv_sz = sqlcipher_cc_get_iv_sz;
186178
p->get_block_sz = sqlcipher_cc_get_block_sz;
187179
p->get_hmac_sz = sqlcipher_cc_get_hmac_sz;
188-
p->ctx_copy = sqlcipher_cc_ctx_copy;
189-
p->ctx_cmp = sqlcipher_cc_ctx_cmp;
190180
p->ctx_init = sqlcipher_cc_ctx_init;
191181
p->ctx_free = sqlcipher_cc_ctx_free;
192182
p->add_random = sqlcipher_cc_add_random;

src/crypto_libtomcrypt.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,6 @@ static int sqlcipher_ltc_get_hmac_sz(void *ctx, int algorithm) {
250250
return hash_descriptor[hash_idx].hashsize;
251251
}
252252

253-
static int sqlcipher_ltc_ctx_copy(void *target_ctx, void *source_ctx) {
254-
return SQLITE_OK;
255-
}
256-
257-
static int sqlcipher_ltc_ctx_cmp(void *c1, void *c2) {
258-
return 1;
259-
}
260-
261253
static int sqlcipher_ltc_ctx_init(void **ctx) {
262254
sqlcipher_ltc_activate(NULL);
263255
return SQLITE_OK;
@@ -285,8 +277,6 @@ int sqlcipher_ltc_setup(sqlcipher_provider *p) {
285277
p->get_iv_sz = sqlcipher_ltc_get_iv_sz;
286278
p->get_block_sz = sqlcipher_ltc_get_block_sz;
287279
p->get_hmac_sz = sqlcipher_ltc_get_hmac_sz;
288-
p->ctx_copy = sqlcipher_ltc_ctx_copy;
289-
p->ctx_cmp = sqlcipher_ltc_ctx_cmp;
290280
p->ctx_init = sqlcipher_ltc_ctx_init;
291281
p->ctx_free = sqlcipher_ltc_ctx_free;
292282
p->add_random = sqlcipher_ltc_add_random;

src/crypto_openssl.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -323,15 +323,6 @@ static int sqlcipher_openssl_get_hmac_sz(void *ctx, int algorithm) {
323323
}
324324
}
325325

326-
static int sqlcipher_openssl_ctx_copy(void *target_ctx, void *source_ctx) {
327-
memcpy(target_ctx, source_ctx, sizeof(openssl_ctx));
328-
return SQLITE_OK;
329-
}
330-
331-
static int sqlcipher_openssl_ctx_cmp(void *c1, void *c2) {
332-
return ((openssl_ctx *)c1)->evp_cipher == ((openssl_ctx *)c2)->evp_cipher;
333-
}
334-
335326
static int sqlcipher_openssl_ctx_init(void **ctx) {
336327
openssl_ctx *o_ctx;
337328

@@ -371,8 +362,6 @@ int sqlcipher_openssl_setup(sqlcipher_provider *p) {
371362
p->get_iv_sz = sqlcipher_openssl_get_iv_sz;
372363
p->get_block_sz = sqlcipher_openssl_get_block_sz;
373364
p->get_hmac_sz = sqlcipher_openssl_get_hmac_sz;
374-
p->ctx_copy = sqlcipher_openssl_ctx_copy;
375-
p->ctx_cmp = sqlcipher_openssl_ctx_cmp;
376365
p->ctx_init = sqlcipher_openssl_ctx_init;
377366
p->ctx_free = sqlcipher_openssl_ctx_free;
378367
p->add_random = sqlcipher_openssl_add_random;

src/sqlcipher.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ typedef struct {
6565
int (*get_iv_sz)(void *ctx);
6666
int (*get_block_sz)(void *ctx);
6767
int (*get_hmac_sz)(void *ctx, int algorithm);
68-
int (*ctx_copy)(void *target_ctx, void *source_ctx);
69-
int (*ctx_cmp)(void *c1, void *c2);
7068
int (*ctx_init)(void **ctx);
7169
int (*ctx_free)(void **ctx);
7270
int (*fips_status)(void *ctx);

0 commit comments

Comments
 (0)