eliminate unused skip_read_hmac (cleanup from last migration refactor)

This commit is contained in:
Stephen Lombardo 2023-08-16 12:18:02 -04:00
parent 1e25210634
commit bdc020d166
2 changed files with 1 additions and 2 deletions

View File

@ -215,7 +215,6 @@ typedef struct {
int plaintext_header_sz;
int hmac_algorithm;
int kdf_algorithm;
unsigned int skip_read_hmac;
unsigned int need_kdf_salt;
unsigned int flags;
unsigned char *kdf_salt;

View File

@ -1112,7 +1112,7 @@ int sqlcipher_page_cipher(codec_ctx *ctx, int for_ctx, Pgno pgno, int mode, int
memcpy(iv_out, iv_in, ctx->iv_sz); /* copy the iv from the input to output buffer */
}
if((ctx->flags & CIPHER_FLAG_HMAC) && (mode == CIPHER_DECRYPT) && !ctx->skip_read_hmac) {
if((ctx->flags & CIPHER_FLAG_HMAC) && (mode == CIPHER_DECRYPT)) {
if(sqlcipher_page_hmac(ctx, c_ctx, pgno, in, size + ctx->iv_sz, hmac_out) != SQLITE_OK) {
sqlcipher_log(SQLCIPHER_LOG_ERROR, "sqlcipher_page_cipher: hmac operation on decrypt failed for pgno=%d", pgno);
goto error;