From a8556e6071bd651761eb456d340648c764b5e0e2 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Mon, 3 Oct 2016 15:53:18 -0400 Subject: updated to latest amalgamation --- amalgamation/sqlite3.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/amalgamation/sqlite3.c b/amalgamation/sqlite3.c index 95245c5..fd39ec6 100644 --- a/amalgamation/sqlite3.c +++ b/amalgamation/sqlite3.c @@ -15763,9 +15763,9 @@ struct IntegrityCk { #ifndef CIPHER_VERSION #ifdef SQLCIPHER_FIPS -#define CIPHER_VERSION "3.3.1 FIPS" +#define CIPHER_VERSION "3.4.0 FIPS" #else -#define CIPHER_VERSION "3.3.1" +#define CIPHER_VERSION "3.4.0" #endif #endif @@ -16009,6 +16009,7 @@ static int codec_set_pass_key(sqlite3* db, int nDb, const void *zKey, int nKey, } int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLeft, const char *zRight) { + char *pragma_cipher_deprecated_msg = "PRAGMA cipher command is deprecated, please remove from usage."; struct Db *pDb = &db->aDb[iDb]; codec_ctx *ctx = NULL; int rc; @@ -16074,6 +16075,9 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef if(ctx) { if( zRight ) { sqlcipher_codec_ctx_set_cipher(ctx, zRight, 2); // change cipher for both + codec_vdbe_return_static_string(pParse, "cipher", pragma_cipher_deprecated_msg); + sqlite3_log(SQLITE_WARNING, pragma_cipher_deprecated_msg); + return SQLITE_ERROR; }else { codec_vdbe_return_static_string(pParse, "cipher", sqlcipher_codec_ctx_get_cipher(ctx, 2)); @@ -18570,11 +18574,12 @@ static const char* sqlcipher_cc_get_provider_name(void *ctx) { static const char* sqlcipher_cc_get_provider_version(void *ctx) { #if TARGET_OS_MAC + CFTypeRef version; CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.security")); if(bundle == NULL) { return "unknown"; } - CFTypeRef version = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString")); + version = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString")); return CFStringGetCStringPtr(version, kCFStringEncodingUTF8); #else return "unknown"; -- cgit v1.2.3