Skip to content

Commit bdc020d

Browse files
committed
eliminate unused skip_read_hmac (cleanup from last migration refactor)
1 parent 1e25210 commit bdc020d

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/crypto.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ typedef struct {
215215
int plaintext_header_sz;
216216
int hmac_algorithm;
217217
int kdf_algorithm;
218-
unsigned int skip_read_hmac;
219218
unsigned int need_kdf_salt;
220219
unsigned int flags;
221220
unsigned char *kdf_salt;

src/crypto_impl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ int sqlcipher_page_cipher(codec_ctx *ctx, int for_ctx, Pgno pgno, int mode, int
11121112
memcpy(iv_out, iv_in, ctx->iv_sz); /* copy the iv from the input to output buffer */
11131113
}
11141114

1115-
if((ctx->flags & CIPHER_FLAG_HMAC) && (mode == CIPHER_DECRYPT) && !ctx->skip_read_hmac) {
1115+
if((ctx->flags & CIPHER_FLAG_HMAC) && (mode == CIPHER_DECRYPT)) {
11161116
if(sqlcipher_page_hmac(ctx, c_ctx, pgno, in, size + ctx->iv_sz, hmac_out) != SQLITE_OK) {
11171117
sqlcipher_log(SQLCIPHER_LOG_ERROR, "sqlcipher_page_cipher: hmac operation on decrypt failed for pgno=%d", pgno);
11181118
goto error;

0 commit comments

Comments
 (0)