From 8fe2c3429d5aea03bc2a181086b67d68d921d925 Mon Sep 17 00:00:00 2001 From: Stephen Lombardo Date: Wed, 6 Mar 2019 12:30:31 -0500 Subject: [PATCH] fix references to refactored struct under CODEC_DEBUG --- src/crypto_impl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/crypto_impl.c b/src/crypto_impl.c index 8b7f3dd0..2f8797ca 100644 --- a/src/crypto_impl.c +++ b/src/crypto_impl.c @@ -1106,10 +1106,10 @@ error: static int sqlcipher_cipher_ctx_key_derive(codec_ctx *ctx, cipher_ctx *c_ctx) { int rc; CODEC_TRACE("cipher_ctx_key_derive: entered c_ctx->pass=%s, c_ctx->pass_sz=%d \ - ctx->kdf_salt=%p ctx->kdf_salt_sz=%d c_ctx->kdf_iter=%d \ - ctx->hmac_kdf_salt=%p, c_ctx->fast_kdf_iter=%d ctx->key_sz=%d\n", - c_ctx->pass, c_ctx->pass_sz, ctx->kdf_salt, ctx->kdf_salt_sz, c_ctx->kdf_iter, - ctx->hmac_kdf_salt, c_ctx->fast_kdf_iter, ctx->key_sz); + ctx->kdf_salt=%p ctx->kdf_salt_sz=%d ctx->kdf_iter=%d \ + ctx->hmac_kdf_salt=%p, ctx->fast_kdf_iter=%d ctx->key_sz=%d\n", + c_ctx->pass, c_ctx->pass_sz, ctx->kdf_salt, ctx->kdf_salt_sz, ctx->kdf_iter, + ctx->hmac_kdf_salt, ctx->fast_kdf_iter, ctx->key_sz); if(c_ctx->pass && c_ctx->pass_sz) { /* if key material is present on the context for derivation */ @@ -1130,7 +1130,7 @@ static int sqlcipher_cipher_ctx_key_derive(codec_ctx *ctx, cipher_ctx *c_ctx) { cipher_hex2bin(z, (ctx->key_sz * 2), c_ctx->key); cipher_hex2bin(z + (ctx->key_sz * 2), (ctx->kdf_salt_sz * 2), ctx->kdf_salt); } else { - CODEC_TRACE("cipher_ctx_key_derive: deriving key using full PBKDF2 with %d iterations\n", c_ctx->kdf_iter); + CODEC_TRACE("cipher_ctx_key_derive: deriving key using full PBKDF2 with %d iterations\n", ctx->kdf_iter); if(ctx->provider->kdf(ctx->provider_ctx, ctx->kdf_algorithm, c_ctx->pass, c_ctx->pass_sz, ctx->kdf_salt, ctx->kdf_salt_sz, ctx->kdf_iter, ctx->key_sz, c_ctx->key) != SQLITE_OK) return SQLITE_ERROR; @@ -1156,7 +1156,7 @@ static int sqlcipher_cipher_ctx_key_derive(codec_ctx *ctx, cipher_ctx *c_ctx) { } CODEC_TRACE("cipher_ctx_key_derive: deriving hmac key from encryption key using PBKDF2 with %d iterations\n", - c_ctx->fast_kdf_iter); + ctx->fast_kdf_iter); if(ctx->provider->kdf(ctx->provider_ctx, ctx->kdf_algorithm, c_ctx->key, ctx->key_sz, -- 2.11.4.GIT