Merge branch 'master' into prerelease

This commit is contained in:
Stephen Lombardo 2016-12-13 15:11:55 -05:00
commit 3f990b42f3
2 changed files with 3 additions and 2 deletions

View File

@ -79,6 +79,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;
@ -144,7 +145,6 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
if(ctx) {
if( zRight ) {
rc = sqlcipher_codec_ctx_set_cipher(ctx, zRight, 2); // change cipher for both
char *pragma_cipher_deprecated_msg = "PRAGMA cipher command is deprecated, please remove from usage.";
codec_vdbe_return_static_string(pParse, "cipher", pragma_cipher_deprecated_msg);
sqlite3_log(SQLITE_WARNING, pragma_cipher_deprecated_msg);
return rc;

View File

@ -52,11 +52,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";